Race condition in Autofill (CVE-2026-79014)
A logic flaw in Chrome's autofill suggestion pipeline lets a compromised renderer corrupt the stored delegate state during a task boundary, so cross-origin payment or profile suggestions can be filled into attacker-controlled fields. If the user accepts a suggestion, sensitive card or address data could be disclosed to the compromised renderer.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 38 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 logic flaw in ChromeAutofillClient and AutofillExternalDelegate could potentially allow a compromised renderer to bypass Autofill cross-origin security checks. By exploiting a task boundary between the asynchronous execution of ShowAutofillSuggestions and ShowAutofillSuggestionsImpl, an attacker can corrupt the stored delegate state. This can result in sensitive cross-origin payment or profile suggestions being filled into attacker-controlled fields upon user acceptance.
Affected files:
chrome/browser/ui/autofill/chrome_autofill_client.cccomponents/autofill/core/browser/ui/autofill_external_delegate.cc
Estimated timestamp from git blame: 2024-04-15
Detailed Analysis
A potential logic vulnerability exists in the asynchronous suggestion-showing pipeline in ChromeAutofillClient and the way session state is managed in AutofillExternalDelegate. This flaw could enable a compromised renderer to hijack autofill suggestions intended for a cross-origin iframe and redirect the filled values into its own fields.
Root Cause and Mechanism
-
Task Boundary and No-Op Hiding: When suggestions are shown,
ChromeAutofillClient::ShowAutofillSuggestionsschedules the creation and showing of the popup on the UI thread via aPostTask:C++ // chrome/browser/ui/autofill/chrome_autofill_client.cc base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&ChromeAutofillClient::ShowAutofillSuggestionsImpl, ...));During the interval between this
PostTaskand the execution ofShowAutofillSuggestionsImpl,ChromeAutofillClient::suggestion_controller_remainsnullptr. Consequently, any call toChromeAutofillClient::HideSuggestions()in this window results in a silent early return (no-op) without canceling the pending showing task:C++ // chrome/browser/ui/autofill/chrome_autofill_client.cc void ChromeAutofillClient::HideSuggestions(...) { if (!suggestion_controller_) { return; // No-op in the gap before ShowAutofillSuggestionsImpl executes } ... } -
Delegate Hijacking: In a cross-origin form hierarchy (e.g., origin A embedding cross-origin payment iframe M), the browser flattens the frame tree into a single browser form within the root
FormForest(components/autofill/core/browser/foundations/autofill_driver_router.cc). Thus,AskForValuesToFillrequests from both A and M are routed to the root frame's (A)BrowserAutofillManagerand handled by the sameAutofillExternalDelegate.If the user triggers autofill inside M, a suggestion generation task is run, culminating in
ShowAutofillSuggestionsbeing called on root-A's delegate. This posts the T1 task (ShowAutofillSuggestionsImpl).Before T1 executes on the UI thread, a compromised renderer A can interleave its own
AskForValuesToFillIPC. When A's request is handled:AutofillExternalDelegate::OnQueryis invoked, overwritinglast_query_with A's field ID.- A can intentionally supply
is_focusable = falsein its Mojo request. This triggers the!is_focusablecheck inAttemptToDisplayAutofillSuggestions(), which callsHideSuggestions(SuggestionHidingReason::kStaleData). - Since
suggestion_controller_is stillnullptr, this hiding attempt is a silent no-op. The pending T1 task is not canceled, butlast_query_has now been corrupted with A's field ID.
-
Bypassing the IsSafeToFill Security Check: When T1 eventually executes, M's suggestions (containing sensitive credit card numbers or address profiles) are displayed. When the user accepts a suggestion:
AutofillExternalDelegate::DidAcceptSuggestionqueries the form and field viaGetQueriedFormAndField(), which uses the corruptedlast_query_.field_id(pointing to A's field).- In
FormFiller::FillOrPreviewForm, the browser checksIsSafeToFill(field, ..., trigger_field.origin()). - Because
trigger_fieldwas resolved using the corruptedlast_query_.field_id(which belongs to A),trigger_field.origin()resolves to A's origin. The destination field also belongs to A, so the origin checkfield.origin() == trigger_originpasses. - The browser then fills the cross-origin card or profile values into A's fields, disclosing the sensitive data to the compromised renderer.
Potential Attack Steps
- Establish the Form Structure: A page on origin A (hosted by a compromised renderer) embeds a cross-origin payment iframe M. In
FormsSeen, both forms are linked together so theFormForesttreats them as part of a single tree. Origin A marks its fieldafas focusable so that it is cached as such. - Spam IPCs: The compromised renderer A spams
mojom::AutofillDriver::AskForValuesToFillfor fieldaf, but setsis_focusable = falsespecifically within the Mojo parameter structure. - User Interaction: The user clicks on M's payment field
ccinside the iframe. - Race Trigger: The browser handles the click on
cc, generates suggestions, and schedulesShowAutofillSuggestionsImpl. One of A's queuedAskForValuesToFilltasks executes in the task boundary, corruptinglast_query_to point toafwithout dismissing the scheduled show task. - Accepting Suggestion: The user accepts a suggestion from the popup (which is anchored on M's field).
- Information Disclosure: The browser's safety check is bypassed because
last_query_points toaf. The sensitive data is filled into A's frame and captured by the compromised renderer.
Note: These steps are based on static analysis and code tracing; our security team has not executed a live proof-of-concept.
Suggested Remediation
To mitigate this issue, ensure that any pending showing tasks are canceled when suggestions are hidden or when the active query changes.
- Cancel Outstanding Show Tasks on Hide:
Track the pending showing task via a cancellable task or token, and cancel it when
HideSuggestionsis called, even ifsuggestion_controller_has not been instantiated yet. - Implement Generation/Session ID Validation:
Validate that the
SuggestionUiSessionIdor active field ID matches the delegate's currentlast_query_state whenShowAutofillSuggestionsImplis run, aborting the show operation if a mismatch is detected.
Evaluated with Chrome root at commit: bf775e5d75cb9e1767e2cd02cc93efa0077d14a5
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 pending suggestion-showing task is not cancelled when HideSuggestions runs before the suggestion controller exists, and the stored last_query_ can be overwritten in that window without invalidating the queued show task.
Impact
A compromised renderer could cause cross-origin payment or profile data to be filled into its own fields, disclosing it, but only if the user accepts a suggestion; the text notes no live proof-of-concept was executed.
What the attacker needed
Compromised renderer; victim accepts an autofill suggestion; cross-origin payment iframe present
The fix
Pending showing tasks should be cancelled when suggestions are hidden or the active query changes, and the show step should validate the session or field ID against the current query before proceeding.
How it was found
- A page on origin A embeds a cross-origin payment iframe M, and both forms are linked in the FormForest.
- The compromised renderer A spams AskForValuesToFill for its own field while marking it as not focusable.
- The user clicks the payment field inside iframe M.
- The browser schedules the suggestion popup, and one of A's queued requests runs in the gap, corrupting the stored query without dismissing the pending show.
- The user accepts a suggestion from the popup anchored on M's field.
- The safety check passes against A's origin and the sensitive values are filled into A's frame.
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.
Autofill shows suggestions for a form field, and the browser is meant to only fill values into the field the suggestions were generated for. Here, a malicious page could swap which field the browser thinks the suggestions belong to, so the saved card or address gets typed into the attacker's own field instead. The attacker still needs the user to pick a suggestion, and the page must already be compromised.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.