Insufficient validation of untrusted input in Password Manager (CVE-2026-11251)
A compromised renderer could bypass Incognito and enterprise policy restrictions to save passwords for its own origin into the main profile. This occurs because a debug-only check (DCHECK) is compiled out in release builds, allowing the browser to persistently write credentials to disk.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A compromised renderer can bypass Incognito and enterprise policy restrictions to save passwords for its own origin into the main profile. This occurs because PasswordManager::OnPresaveGeneratedPassword relies on a DCHECK rather than a runtime check to verify if password saving is enabled. In release builds, this check is compiled out, allowing the browser to persistently write the credentials to disk.
Affected files:
components/password_manager/core/browser/password_manager.ccchrome/browser/password_manager/chrome_password_manager_client.cccomponents/password_manager/core/browser/password_form_manager.cccomponents/password_manager/core/browser/password_save_manager_impl.cccomponents/password_manager/core/browser/form_saver_impl.cc
Estimated timestamp from git blame: 2024-05-27
Description
There is a potential logic flaw in the password manager that allows a compromised renderer process to bypass Incognito mode guarantees and enterprise policies (such as PasswordManagerEnabled = false) to persistently save credentials into the user's main profile.
In components/password_manager/core/browser/password_manager.cc, the method OnPresaveGeneratedPassword relies on a DCHECK to ensure password saving is permitted:
void PasswordManager::OnPresaveGeneratedPassword(..., const FormData& form_data, ...) {
DCHECK(client_->IsSavingAndFillingEnabled(form_data.url()));
// ... proceeds to save the password
}
Because DCHECK macros evaluate to a no-op in official Release builds, this critical policy check is bypassed in production.
When this IPC is triggered in an Incognito session, the browser attempts to save the generated password. Because ChromePasswordManagerClient::GetProfilePasswordStore() requests the store using ServiceAccessType::EXPLICIT_ACCESS, the ProfilePasswordStoreFactory redirects the request and returns the PasswordStore of the original, non-Incognito profile. The underlying PasswordStore does not independently check if the active profile is Off-The-Record, resulting in the attacker-supplied credentials being persistently written to the main profile's on-disk LoginDatabase.
The impact is constrained to the compromised renderer's actual origin, as the browser securely sanitizes the incoming FormData using GetFormWithFrameAndFormMetaData(rfh) before passing it to the core PasswordManager.
Potential Steps to Reproduce
Note: These are suggested steps based on static analysis. Our tooling agent does not currently have the ability to run code to produce a working proof-of-concept.
- Launch Chrome with a clean profile and open an Incognito window.
- Navigate to an attacker-controlled site (e.g.,
https://attacker.com). - Assume the attacker gains Remote Code Execution (RCE) within the renderer process for their site.
- The compromised renderer constructs a synthetic
autofill::FormDatarepresenting a login form and sends theautofill::mojom::PasswordManagerDriver::PasswordFormsParsedIPC to the browser process. - The browser sanitizes the form to match the
attacker.comorigin and caches it in aPasswordFormManager. - The compromised renderer then requests the
autofill::mojom::PasswordGenerationDriverMojo interface and sends thePresaveGeneratedPasswordIPC with the same form data and an attacker-controlled password string. - The browser process receives the IPC, bypasses the compiled-out
DCHECK(client_->IsSavingAndFillingEnabled(...)), and proceeds to save the credential. - Close the Incognito window.
- Open
chrome://password-managerin the regular profile. The injected credential forhttps://attacker.comwill be persistently saved there.
Suggested Fix
Replace the DCHECK in PasswordManager::OnPresaveGeneratedPassword with a proper runtime check that safely drops the IPC if saving is disabled:
void PasswordManager::OnPresaveGeneratedPassword(
PasswordManagerDriver* driver,
const FormData& form_data,
const std::u16string& generated_password) {
if (!client_->IsSavingAndFillingEnabled(form_data.url())) {
return;
}
// ...
}
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
Results from 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 code used a DCHECK (a check that only runs in debug builds) instead of a runtime check to verify that password saving is enabled, so the check was compiled out in release builds.
Impact
A compromised renderer could bypass Incognito mode and enterprise policies to persistently save credentials for its own origin into the main profile, though the impact is limited to that origin because the browser sanitizes the form data.
What the attacker needed
Compromised renderer process; attacker-controlled website; Incognito window or enterprise policy
The fix
The DCHECK should be replaced with a runtime check that drops the IPC if saving is disabled.
How it was found
- Launch Chrome with a clean profile and open an Incognito window.
- Navigate to an attacker-controlled site.
- Assume the attacker gains Remote Code Execution (RCE) within the renderer process for their site.
- The compromised renderer constructs a synthetic form and sends the PasswordFormsParsed IPC to the browser process.
- The browser sanitizes the form to match the attacker's origin and caches it in a PasswordFormManager.
- The compromised renderer requests the PasswordGenerationDriver Mojo interface and sends the PresaveGeneratedPassword IPC with the same form data and an attacker-controlled password string.
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.
A web browser separates web pages into isolated processes called renderers. If an attacker can take control of a renderer (for example, through a separate bug), they might try to make the browser do things it normally would not, like saving a password when password saving is turned off. Here, a safety check was only active in test builds, so in the real browser the check was missing, letting the attacker save a password into the user's normal profile even from a private window.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.