Inappropriate implementation in Chrome for iOS (CVE-2026-17874)
Chrome for iOS's Safe Browsing password reuse detection drops keystrokes for characters outside the Basic Multilingual Plane, such as emojis, because both the injected script and the native receiver require a UTF-16 length of exactly one. A password containing such a character is only partly recorded, so the hash comparison fails and no phishing warning is shown.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 50 days
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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: The Safe Browsing password reuse detection (PhishGuard) on iOS incorrectly drops keystrokes for characters outside the Basic Multilingual Plane (BMP), such as emojis. This is because both the injected JavaScript and the native C++ receiver mandate a UTF-16 string length of exactly 1, which excludes surrogate pairs. Consequently, passwords containing these characters can be entered into phishing sites without triggering a warning.
Affected files:
ios/chrome/browser/safe_browsing/model/password_protection_java_script_feature.mmios/chrome/browser/safe_browsing/model/resources/password_protection.ts
Estimated timestamp from git blame: 2021-02-11
The PhishGuard implementation on iOS, which provides Safe Browsing password reuse detection, contains a logic error in how it handles keystrokes for non-BMP characters. The system monitors user input by listening for keydown events in an injected JavaScript file (ios/chrome/browser/safe_browsing/model/resources/password_protection.ts) and forwarding the event.key value to the browser process.
Both the JavaScript and C++ components enforce a restriction that the captured key's text length must be exactly 1 UTF-16 code unit. This check is intended to exclude special keys like 'Enter' or 'Shift'. However, because JavaScript strings and C++ std::u16string represent characters outside the Basic Multilingual Plane (BMP) as surrogate pairs (length 2), this logic inadvertently excludes them. This includes emojis and certain mathematical symbols.
In password_protection.ts:
if (event.isTrusted && event.key.length === 1 && !event.ctrlKey && !event.metaKey) {
sendWebKitMessage('PasswordProtectionTextEntered', {eventType: 'KeyDown', text: event.key});
}
In ios/chrome/browser/safe_browsing/model/password_protection_java_script_feature.mm:
std::u16string text16 = base::UTF8ToUTF16(*text);
if (text16.length() != 1) {
return;
}
Because these non-BMP characters are silently dropped, the PasswordReuseDetectionManager fails to receive the full password sequence when it is typed into a phishing site. For example, if a user's saved password is mypassword😀, only mypassword will be recorded in the internal keystroke buffer. The subsequent hash comparison against the user's stored password hashes will fail. Consequently, the user will not receive a PhishGuard warning, potentially allowing an attacker to capture their password.
Potential Steps to Reproduce
Note: These steps represent a potential attack sequence, as our tooling has not executed this against a live target.
- An attacker sets up a malicious webpage that visually mimics a legitimate login portal.
- A victim, who has a saved password for the legitimate site containing at least one non-BMP character (e.g.,
mypassword😀), navigates to the phishing site using Chrome on iOS. - The victim types their saved password into the site's input field.
- As they type, the injected
password_protection.tsscript successfully captures and forwards the BMP characters (m,y,p, etc.). - When the victim types the non-BMP character (
😀),event.key.lengthevaluates to2. The script silently drops the keystroke. - The PhishGuard buffer in the browser process only records
mypassword. - The hash comparison fails, bypassing the Safe Browsing warning interstitial entirely.
Suggested Fix
The length check should be updated to verify the number of Unicode scalar values (code points) rather than UTF-16 code units.
In password_protection.ts, this can be achieved by checking if the string contains a single code point (e.g., using Array.from(event.key).length === 1 or [...event.key].length === 1).
In password_protection_java_script_feature.mm, the C++ check should ensure the string corresponds to a single Unicode code point rather than text16.length() == 1.
Evaluated with Chrome root at commit: 2155cb00003ec35716a76ed3246eae995f87b7ff
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 length check counts UTF-16 code units instead of Unicode code points, so characters represented as surrogate pairs are rejected as if they were special keys.
Impact
A user whose saved password contains a non-BMP character could type it into a phishing page without seeing the warning, potentially letting the attacker capture it; the report notes the sequence was not executed against a live target.
What the attacker needed
Chrome on iOS; victim has a saved password with an emoji; victim visits a phishing page; victim types the password
The fix
The length check should count Unicode code points rather than UTF-16 code units in both the JavaScript and the C++ receiver.
How it was found
- An attacker sets up a page that imitates a real login portal.
- A victim with a saved password containing a non-BMP character visits it in Chrome on iOS.
- The victim types the saved password into the page.
- The script forwards the ordinary characters but drops the non-BMP one.
- The keystroke buffer holds only part of the password, so the hash comparison fails and no warning appears.
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 iPhone can warn you when you type a saved password into a fake login page. To do that it watches each key you press and compares what you typed with your saved password. Some characters, like emoji, are stored internally as two pieces rather than one, so the code skipped them, and the comparison no longer matched.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.