Inappropriate implementation in Views (CVE-2026-17973)
On macOS, Chrome's text field only turns on secure event input when the input type is still marked as a password. If a password or PIN field is revealed and then refocused, the type has changed to plain text, so the protection is not re-enabled and keystrokes could be captured by local keyloggers.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 58 days
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: On macOS, views::Textfield::OnFocus decides whether to enable secure event input purely by checking if the input type is TEXT_INPUT_TYPE_PASSWORD. If a password or PIN field is revealed and then refocused, this check fails because the input type becomes TEXT_INPUT_TYPE_TEXT, bypassing the secure-event-input protection. Consequently, subsequent keystrokes typed into the field can be exposed to local processes using CGEventTap keyloggers.
Affected files:
ui/views/controls/textfield/textfield.cc
Estimated timestamp from git blame: 2018-03-12
Description
There is a potential defense-in-depth bypass in Chrome's browser UI on macOS where the macOS-specific EnableSecureEventInput protection is disabled for refocused, revealed password or PIN fields.
On macOS, views::Textfield::OnFocus decides whether to instantiate ui::ScopedPasswordInputEnabler (which calls Carbon's EnableSecureEventInput() and restricts IMEs to ASCII-only inputs) purely based on the raw text_input_type_ field:
// ui/views/controls/textfield/textfield.cc
#if BUILDFLAG(IS_MAC)
if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) {
password_input_enabler_ =
std::make_unique<ui::ScopedPasswordInputEnabler>();
}
#endif
However, when a user clicks the "reveal eye" toggle button (e.g., in the GPM PIN sheet or the Save/Update Password bubble), the following sequence potentially occurs:
- Clicking the button forces the textfield to blur (
SetRequestFocusOnPress(true)), which runsTextfield::OnBlur()and destroys thepassword_input_enabler_(disabling secure event input). - The button's toggle callback updates the textfield's input type to
TEXT_INPUT_TYPE_TEXTand adds the flagTEXT_INPUT_FLAG_HAS_BEEN_PASSWORDto its input flags. - When the user refocuses the textfield to edit or finish typing,
OnFocus()evaluatestext_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD. Since the type is nowTEXT_INPUT_TYPE_TEXT, this check evaluates to false, and the enabler is not recreated. - Consequently, the user enters sensitive information into the field with
EnableSecureEventInputinactive, exposing their keystrokes to any local processes on macOS utilizing aCGEventTapkeylogger.
Note: These are potential steps based on a static code analysis, as our tooling does not currently have the capability to execute code or run dynamic proofs of concept.
Potential Step-by-Step Reproduction
- Run a local application with
CGEventTappermissions on macOS to monitor system-level keystrokes. - Open the Google Password Manager (GPM) arbitrary-PIN sheet or trigger the Save/Update Password bubble in Chrome.
- Click the reveal button to unmask the input field.
- Focus back into the unmasked input field.
- Type characters into the field and observe whether they are intercepted by the local
CGEventTaplistener (which should normally be blocked when entering password/PIN data).
Suggested Fix
To resolve this issue, the secure-event-input check in views::Textfield::OnFocus should also evaluate the TEXT_INPUT_FLAG_HAS_BEEN_PASSWORD flag so that revealed password/PIN fields maintain their protection upon refocusing:
#if BUILDFLAG(IS_MAC)
if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD ||
(text_input_flags_ & ui::TEXT_INPUT_FLAG_HAS_BEEN_PASSWORD)) {
password_input_enabler_ =
std::make_unique<ui::ScopedPasswordInputEnabler>();
}
#endif
Evaluated with Chrome root at commit: 87214e6721f6c34afd9181b80769a24c0c601c50
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the focus handler checks only the current input type and ignores the flag recording that the field was previously a password field.
Impact
Keystrokes typed into a revealed and refocused password or PIN field could be captured by local processes using a CGEventTap keylogger; the report is based on static analysis and was not demonstrated.
What the attacker needed
MacOS; local process with CGEventTap permission; user reveals then refocuses the field
The fix
The focus check should also test the flag that records the field was previously a password, so revealed fields keep the protection when refocused.
How it was found
- Run a local app with CGEventTap permission to watch keystrokes
- Open the password manager PIN sheet or the save/update password bubble
- Click the reveal button to unmask the field
- Focus back into the unmasked field
- Type characters and see whether the local listener captures them
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
macOS has a feature that stops other programs on the same machine from reading what you type into password boxes. Chrome only switches this on when it thinks the box is still a password box. If you click the eye icon to show the password and then click back into the box, Chrome forgets it is a password box, so other programs could listen to your typing.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.