Incorrect security UI in Safe Browsing (CVE-2026-13912)
The Password Reuse Detection feature on iOS listens only for keypress events, which a malicious page can suppress by cancelling keydown events. An attacker could therefore steal a saved password without triggering the warning interstitial.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Flapjack, 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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: The Password Reuse Detection (PhishGuard) feature on iOS relies on a JavaScript listener for keypress events to monitor user input. A malicious webpage can bypass this detection entirely by intercepting and canceling keydown events, which prevents the browser from ever dispatching the keypress event that the security script monitors.
Affected files:
ios/chrome/browser/safe_browsing/model/resources/password_protection.tsios/chrome/browser/safe_browsing/model/password_protection_java_script_feature.mm
Estimated timestamp from git blame: 2021-02-11
Background
On iOS, WKWebView lacks native APIs (like RenderWidgetHost::InputEventObserver) to observe user input events directly from the embedder. To support the Password Reuse Detection (PhishGuard) feature, Chrome injects a script (ios/chrome/browser/safe_browsing/model/resources/password_protection.ts) into an isolated world on the page.
This script listens for user keystrokes and forwards them to the native browser process to check against saved passwords. Currently, the script relies exclusively on the keypress and paste events:
// ios/chrome/browser/safe_browsing/model/resources/password_protection.ts
window.addEventListener('keypress', onKeypressEvent, true);
window.addEventListener('paste', onPasteEvent, true);
Vulnerability Details
According to the W3C UI Events specification, the keypress event is dependent on the preceding keydown event. If the default action of a keydown event is prevented (e.g., via event.preventDefault()), the browser engine must not dispatch the subsequent keypress event.
Because the password_protection.ts script only listens for keypress, it is blind to any keystrokes where the preceding keydown event was canceled by the webpage. Since the page's main-world scripts execute before isolated-world scripts can see derived events, a malicious page can reliably intercept and hide user input.
Potential Exploit Scenario
Note: These are potential steps based on static analysis.
- An attacker hosts a phishing page designed to steal credentials.
- The attacker adds a script to the main world that intercepts
keydownevents on the password input field. - Inside the event listener, the script calls
event.preventDefault(), which stops the browser from generating thekeypressevent. - To simulate normal typing for the victim, the attacker's script manually reads
event.keyand appends it to the input field's value. - The victim types their saved password into the field.
- Because
keypressevents are completely suppressed by the browser engine, the isolated worldpassword_protection.tsscript observes nothing. - The native
IOSChromePasswordReuseDetectionManagerClientreceives no keystroke data, the PhishGuard heuristic is never triggered, and the password is stolen without any warning interstitial being shown to the user.
Suggested Fix
The password_protection.ts script should be updated to observe events that cannot be easily suppressed or bypassed by the page's main world logic.
Potential mitigations include:
- Listen to
keydowninstead ofkeypress: Changing the listener tokeydownin the capture phase ensures the isolated script sees the physical key press before the main world has a chance to callpreventDefault(). - Observe
inputevents: Theinputevent fires whenever the value of an<input>element changes, regardless of whether it was typed naturally, pasted, or modified via a script responding to a canceledkeydownevent. This may provide a more robust way to monitor what text is actually accumulating in the field.
Evaluated with Chrome root at commit: cc901875d53bf4e4fe0e01f02843871da4106e70
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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
The detection script listens only for keypress events, which the page can prevent by cancelling the preceding keydown event.
Impact
The password reuse warning could be bypassed, allowing a phishing page to capture a saved password without any warning interstitial being shown.
What the attacker needed
Victim uses Chrome on iOS; victim visits a malicious page; victim types a saved password
The fix
The detection script should listen to keydown in the capture phase or observe input events instead of relying on keypress.
How it was found
- An attacker hosts a phishing page designed to steal credentials.
- The attacker adds a script to the main world that intercepts keydown events on the password input field.
- Inside the event listener, the script calls event.preventDefault(), which stops the browser from generating the keypress event.
- To simulate normal typing for the victim, the attacker's script manually reads event.key and appends it to the input field's value.
- The victim types their saved password into the field.
- Because keypress events are completely suppressed by the browser engine, the isolated world password_protection.ts script observes nothing.
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.
Chrome on iOS has a feature that watches what you type into password fields and warns you if you reuse a saved password on a suspicious page. The page can stop the browser from sending the signal that this feature relies on, so the warning never appears and your password can be taken silently.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.