Chrome · Views
CVE-2026-14062
Logic Error in Views
Overview
Low
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Changed Functions
| Function | Change | Notes |
|---|---|---|
TEST_Fui/views/controls/editable_combobox/editable_password_combobox_unittest.cc |
modified |
Files Changed
ui/views/controls/editable_combobox/editable_password_combobox.ccui/views/controls/editable_combobox/editable_password_combobox_unittest.cc
Patch
From 43fe4cf0e841038b9fdfa682d6261f6f50bd38fe Mon Sep 17 00:00:00 2001
From: Andrew Paseltiner <apaseltiner@chromium.org>
Date: Tue, 12 May 2026 10:46:40 -0700
Subject: [PATCH] Set HAS_BEEN_PASSWORD flag when revealing passwords
When a user reveals a password in the 'Save Password' bubble, the
textfield's input type is changed to TEXT. This change ensures that
TEXT_INPUT_FLAG_HAS_BEEN_PASSWORD is set on the textfield to notify the
IME that the field contains sensitive data, preventing third-party IMEs
from reading the plaintext password on ChromeOS.
Fixed: 502448128
Change-Id: I47525b87471c3e8743cb63be68ac4fe9407f5a10
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7837965
Commit-Queue: Andrew Paseltiner <apaseltiner@chromium.org>
Reviewed-by: Dana Fried <dfried@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1629448}
---
diff --git a/ui/views/controls/editable_combobox/editable_password_combobox.cc b/ui/views/controls/editable_combobox/editable_password_combobox.cc
index 28a8c6c6..688cb2a 100644
--- a/ui/views/controls/editable_combobox/editable_password_combobox.cc
+++ b/ui/views/controls/editable_combobox/editable_password_combobox.cc
@@ -12,6 +12,7 @@
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
+#include "ui/base/ime/text_input_flags.h"
#include "ui/base/ime/text_input_type.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
@@ -137,6 +138,8 @@
are_passwords_revealed_ = revealed;
GetTextfield().SetTextInputType(revealed ? ui::TEXT_INPUT_TYPE_TEXT
: ui::TEXT_INPUT_TYPE_PASSWORD);
+ GetTextfield().SetTextInputFlags(GetTextfield().GetTextInputFlags() |
+ ui::TEXT_INPUT_FLAG_HAS_BEEN_PASSWORD);
eye_->SetToggled(revealed);
UpdateMenu();
}
diff --git a/ui/views/controls/editable_combobox/editable_password_combobox_unittest.cc b/ui/views/controls/editable_combobox/editable_password_combobox_unittest.cc
index 859d0db..29332e1 100644
--- a/ui/views/controls/editable_combobox/editable_password_combobox_unittest.cc
+++ b/ui/views/controls/editable_combobox/editable_password_combobox_unittest.cc
@@ -15,6 +15,7 @@
#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/ime/text_input_flags.h"
#include "ui/base/models/combobox_model.h"
#include "ui/base/models/menu_model.h"
#include "ui/base/models/simple_combobox_model.h"
@@ -26,6 +27,7 @@
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/editable_combobox/editable_combobox.h"
+#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
@@ -72,6 +74,8 @@
widget_->GetContentsView()->GetViewByID(kComboboxId));
}
+ Textfield& GetTextfield() { return combobox()->GetTextfield(); }
+
base::MockCallback<Button::PressedCallback::Callback>* eye_mock_callback() {
return &eye_callback_;
}
@@ -150,11 +154,15 @@
EXPECT_TRUE(combobox()->ArePasswordsRevealed());
EXPECT_EQ(u"item0", GetItemAt(0));
EXPECT_EQ(u"item1", GetItemAt(1));
+ EXPECT_TRUE(GetTextfield().GetTextInputFlags() &
+ ui::TEXT_INPUT_FLAG_HAS_BEEN_PASSWORD);
combobox()->RevealPasswords(/*revealed=*/false);
EXPECT_FALSE(combobox()->ArePasswordsRevealed());
EXPECT_EQ(kObscuredPassword, GetItemAt(0));
EXPECT_EQ(kObscuredPassword, GetItemAt(1));
+ EXPECT_TRUE(GetTextfield().GetTextInputFlags() &
+ ui::TEXT_INPUT_FLAG_HAS_BEEN_PASSWORD);
}
TEST_F(EditablePasswordComboboxTest, EyeButtonClickInvokesCallback) {
Loading diff…
Regression Test / PoC
shipped with the fix
diff --git a/ui/views/controls/editable_combobox/editable_password_combobox_unittest.cc b/ui/views/controls/editable_combobox/editable_password_combobox_unittest.cc
index 859d0db..29332e1 100644
--- a/ui/views/controls/editable_combobox/editable_password_combobox_unittest.cc
+++ b/ui/views/controls/editable_combobox/editable_password_combobox_unittest.cc
@@ -15,6 +15,7 @@
#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/ime/text_input_flags.h"
#include "ui/base/models/combobox_model.h"
#include "ui/base/models/menu_model.h"
#include "ui/base/models/simple_combobox_model.h"
@@ -26,6 +27,7 @@
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/editable_combobox/editable_combobox.h"
+#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
@@ -72,6 +74,8 @@
widget_->GetContentsView()->GetViewByID(kComboboxId));
}
+ Textfield& GetTextfield() { return combobox()->GetTextfield(); }
+
base::MockCallback<Button::PressedCallback::Callback>* eye_mock_callback() {
return &eye_callback_;
}
@@ -150,11 +154,15 @@
EXPECT_TRUE(combobox()->ArePasswordsRevealed());
EXPECT_EQ(u"item0", GetItemAt(0));
EXPECT_EQ(u"item1", GetItemAt(1));
+ EXPECT_TRUE(GetTextfield().GetTextInputFlags() &
+ ui::TEXT_INPUT_FLAG_HAS_BEEN_PASSWORD);
combobox()->RevealPasswords(/*revealed=*/false);
EXPECT_FALSE(combobox()->ArePasswordsRevealed());
EXPECT_EQ(kObscuredPassword, GetItemAt(0));
EXPECT_EQ(kObscuredPassword, GetItemAt(1));
+ EXPECT_TRUE(GetTextfield().GetTextInputFlags() &
+ ui::TEXT_INPUT_FLAG_HAS_BEEN_PASSWORD);
}
TEST_F(EditablePasswordComboboxTest, EyeButtonClickInvokesCallback) {
Loading diff…
Original Bug Report
The reporter's bug is still restricted on the tracker. Chrome de-restricts security bugs ~30–90 days after the fix ships; a later run will backfill it here.
References
On This Page