Use after free in Passwords (CVE-2026-10900)
A use-after-free vulnerability exists in the browser process when a password manual fallback flow triggers a macOS system dialog that spins a nested run loop, allowing the page to be destroyed and the flow object freed. When the dialog is dismissed, the code calls a virtual method on the freed object, potentially leading to attacker-controlled code execution in the unsandboxed browser process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 8 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: A potential Use-After-Free (UAF) vulnerability exists in the browser process in PasswordManualFallbackFlow::DidAcceptSuggestion. When performing manual fallback password authentication on macOS, a synchronous system dialog spins a nested CFRunLoop, during which the tab or page can be destroyed. When the dialog is dismissed, the stack unwinds back to the deleted flow object, leading to a virtual function dispatch on a freed this pointer.
Affected files:
components/password_manager/core/browser/password_manual_fallback_flow.cc
Estimated timestamp from git blame: 2024-02-29
Root Cause
In PasswordManualFallbackFlow::DidAcceptSuggestion (defined in components/password_manager/core/browser/password_manual_fallback_flow.cc), certain suggestion types (such as SuggestionType::kFillPassword or SuggestionType::kPasswordEntry) trigger a device re-authentication request via the device authenticator.
On macOS, if biometric authentication is not available, the code falls back to non-biometric authentication via DeviceAuthenticatorMac::AuthenticateWithMessage -> AuthenticatorMac::AuthenticateUserWithNonBiometrics -> password_manager_util_mac::AuthenticateUser -> base::mac::GetAuthorizationRightsWithPrompt -> AuthorizationCopyRights.
AuthorizationCopyRights displays a native macOS modal system password dialog and pumps a nested CFRunLoop on the UI thread to keep the application responsive. Because a nested run loop is running, tasks sent to the UI thread are executed. If the page or the popup is closed or navigated during this time (for example, via window.close() or frame navigation), the ContentPasswordManagerDriver is destroyed, which in turn destroys PasswordAutofillManager and resets its owned PasswordManualFallbackFlow instance.
When the modal dialog is eventually dismissed, the stack unwinds back to PasswordManualFallbackFlow::DidAcceptSuggestion. At the end of this function, it attempts to execute:
autofill_client_->HideSuggestions(
autofill::SuggestionHidingReason::kAcceptSuggestion,
GetMainFillingProduct());
Because the PasswordManualFallbackFlow instance has been destroyed, this is a dangling pointer. Since the stack frame holds a bare this pointer (which is not protected by raw_ptr or MiraclePtr), and no active raw_ptr keeps the allocation in the BackupRefPtr quarantine, the memory can be reclaimed. An attacker can reclaim this heap slot and control the value of the autofill_client_ pointer, turning the subsequent virtual method call HideSuggestions into an attacker-controlled virtual method dispatch (vptr hijack) in the unsandboxed browser process.
Potential Trigger Path
Note: These are potential/suggested steps. Our analysis is based on static code review, and our tooling does not currently have the ability to run code or execute a live proof of concept.
- A victim interacts with a password manual fallback dropdown (e.g., right-clicking a text field on an attacker-controlled page, selecting Autofill -> Select password, and clicking Fill password).
DidAcceptSuggestioninvokesEnsureCrossDomainPasswordUsageGetsConsent, which runs synchronously when the suggestion is same-domain.- The flow proceeds to
MaybeAuthenticateBeforeFilling, which callsauthenticator_->AuthenticateWithMessage. - If biometrics are unavailable or disabled,
DeviceAuthenticatorMaccallsAuthenticatorMac::AuthenticateUserWithNonBiometrics->password_manager_util_mac::AuthenticateUser->base::mac::GetAuthorizationRightsWithPrompt->AuthorizationCopyRightsto display the macOS authorization dialog, spinning a nestedCFRunLoop. - While the dialog is showing, the attacker page runs script to close the popup (
popup.close()) or initiates a navigation. - The nested run loop dispatches the tab/WebContents destruction task. This destroys the
ContentPasswordManagerDriver, leading to the destruction of thePasswordManualFallbackFlowobject. - The victim dismisses the OS prompt. The stack unwinds back to the end of
DidAcceptSuggestion, whereautofill_client_->HideSuggestionsis called, invoking a virtual method call on a freed object's member.
Suggested Fix
To safely prevent this potential issue, we should use a base::WeakPtr to guard the execution of the remainder of DidAcceptSuggestion if a nested run loop was spawned. Since weak_ptr_factory_ is invalidated when the flow is destroyed, checking weak_this at the end of the function will safely prevent the UAF:
void PasswordManualFallbackFlow::DidAcceptSuggestion(
const Suggestion& suggestion,
const SuggestionMetadata& metadata) {
CHECK(SupportsSuggestionType(suggestion.type));
if (!suggestion.IsAcceptable()) {
return;
}
base::WeakPtr<PasswordManualFallbackFlow> weak_this = weak_ptr_factory_.GetWeakPtr();
// ... existing switch logic ...
if (!weak_this) {
return;
}
autofill_client_->HideSuggestions(
autofill::SuggestionHidingReason::kAcceptSuggestion,
GetMainFillingProduct());
}
Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8
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
The code calls a virtual method on a `this` pointer after a nested run loop has allowed the object to be destroyed, without checking if the object still exists.
Impact
An attacker could reclaim the freed heap slot and control the `autofill_client_` pointer, turning the virtual method call into an attacker-controlled dispatch in the unsandboxed browser process, potentially leading to code execution.
What the attacker needed
MacOS with biometrics unavailable; victim interacts with password fallback; attacker-controlled page
The fix
The code should use a `base::WeakPtr` to check if the flow object still exists before calling `HideSuggestions` after a nested run loop.
How it was found
- Victim interacts with a password manual fallback dropdown on an attacker-controlled page and clicks Fill password.
- The flow calls EnsureCrossDomainPasswordUsageGetsConsent, which runs synchronously for same-domain suggestions.
- The flow proceeds to MaybeAuthenticateBeforeFilling, which calls the authenticator.
- If biometrics are unavailable, a macOS authorization dialog is shown, spinning a nested CFRunLoop.
- While the dialog is showing, the attacker page closes the popup or navigates, destroying the flow object.
- The victim dismisses the dialog, and the code calls HideSuggestions on the freed object.
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 use-after-free happens when a program frees memory but then keeps using it, like deleting a file and then trying to open it. Here, a password prompt on macOS keeps the browser busy while the page can be closed, which deletes an object that the code later tries to use. An attacker could take over that freed memory and run their own code.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.