Skip to content
Race condition Advisory Advanced CVE-2026-17753

Inappropriate implementation in Autofill (CVE-2026-17753)

A time-of-check-to-time-of-use flaw in Chrome's Autofill allowed a malicious page to overwrite cached form and field references during an asynchronous payment operation, so that scanned card data was filled into an attacker-controlled field instead of the legitimate one. This bypassed cross-origin checks and could exfiltrate the full card number and expiry date.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 months

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 without the Chrome Security team.

Overview: A Time-Of-Check-To-Time-Of-Use (TOCTOU) logic flaw exists in AutofillExternalDelegate, where asynchronous payment callbacks rely on mutable class members. A malicious page can overwrite these members during a pending asynchronous operation, bypassing cross-origin security checks and exfiltrating sensitive payment data.

Affected files:

  • components/autofill/core/browser/ui/autofill_external_delegate.cc
  • components/autofill/core/browser/foundations/browser_autofill_manager.cc
  • components/autofill/core/browser/foundations/autofill_driver_router.cc
  • components/autofill/core/browser/filling/form_filler.cc
  • components/autofill/core/browser/foundations/form_forest.cc
  • components/autofill/content/browser/content_autofill_driver.cc

Estimated timestamp from git blame: 2026-04-01

Summary

A potential Time-Of-Check-To-Time-Of-Use (TOCTOU) vulnerability has been identified in the Autofill system. AutofillExternalDelegate caches the target form and field metadata for the current Autofill query in mutable member variables (query_form_ and query_field_). When a user selects a suggestion that triggers an asynchronous operation (such as Scan Credit Card, Server IBAN Unmasking, or BNPL flows), a callback is bound to handle the completion of the operation.

However, the bound callbacks (e.g., OnCreditCardFetched) do not capture the state of the form at the time the operation was initiated. Instead, they read the current values of query_form_ and query_field_ when they execute. A malicious site can exploit this window by programmatically triggering a new Autofill query for an attacker-controlled field before the asynchronous operation completes. This overwrites the cached variables, directing the sensitive payment credentials into the attacker's field and bypassing cross-origin security checks.

Potential Attack Scenario

The following steps describe how an attacker could potentially exploit this vulnerability. Please note that these are suggested steps based on source code analysis, and a working proof-of-concept has not been executed.

  1. Frame Setup: An attacker at https://attacker.com/ embeds a legitimate cross-origin iframe (e.g., https://psp.example/ containing a checkout form) inside their own <form> element. They also place a hidden <textarea> within their form.
  2. Form Stitching: Because the iframe is nested in the attacker's form, FormForest links them. Requests from the victim iframe are routed to the attacker's BrowserAutofillManager and its associated AutofillExternalDelegate.
  3. Initial Interaction: The user clicks a credit card field in the legitimate psp.example iframe. This triggers AutofillExternalDelegate::OnQuery, which saves the psp.example form and field into query_form_ and query_field_.
  4. Asynchronous Trigger: The user selects an asynchronous payment option (e.g., "Scan new card"). The delegate starts the native camera UI and binds the OnCreditCardFetched callback.
  5. The Race (TOCTOU): While the camera UI is pending, the attacker's JavaScript programmatically calls focus() on its hidden <textarea>. This triggers a new AskForValuesToFill IPC (via the kTextareaFocusedWithoutClick trigger source).
  6. State Overwrite: The browser processes the IPC and unconditionally calls AutofillExternalDelegate::OnQuery again, overwriting query_form_ and query_field_ with the attacker's textarea metadata.
  7. Security Bypass and Exfiltration: The user finishes scanning their card. OnCreditCardFetched executes and calls FillOrPreviewForm using the poisoned query_field_. The security check in FormForest::IsSafeToFill verifies if the target field's origin matches the triggered_origin. Since both are now derived from the attacker's textarea, the check passes. The full PAN and expiry date are routed to the attacker's <textarea>.

Suggested Fix

Callbacks for asynchronous operations should not rely on mutable class members (query_form_ and query_field_) that can be altered by concurrent events.

The fix should involve capturing the current FormData and FieldGlobalId (or FormFieldData) directly into the callback bindings when the asynchronous operation is initiated. For example, OnCreditCardFetched should be modified to accept the target form and field ID as parameters, ensuring that the fetched data is always returned to the specific field the user originally interacted with.

Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 asynchronous callbacks read mutable member variables (query_form_ and query_field_) at completion time instead of capturing the original form and field when the operation started.

Impact

The full card number and expiry date could be routed to the attacker's field, bypassing cross-origin checks; the report notes that no working proof-of-concept has been executed.

What the attacker needed

Victim uses Chrome with autofill; victim visits attacker page; victim interacts with a cross-origin checkout iframe; victim selects an asynchronous payment option

The fix

The fix should capture the target form and field identifiers directly in the asynchronous callback bindings so that fetched data always returns to the field the user originally interacted with.

How it was found

  1. The attacker embeds a legitimate cross-origin checkout iframe inside their own form and adds a hidden textarea.
  2. The nested iframe causes the victim iframe's autofill requests to be routed to the attacker's autofill manager and delegate.
  3. The user clicks a credit card field in the legitimate iframe, which stores that form and field in the delegate's cached variables.
  4. The user selects an asynchronous payment option such as scanning a new card, starting a native UI and binding a completion callback.
  5. While that UI is pending, the attacker's script focuses the hidden textarea, triggering a new autofill query that overwrites the cached form and field.
  6. When the scan completes, the callback fills the card data into the attacker's textarea because the origin check now compares the attacker's field with itself.

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.

When you use autofill, the browser remembers which form field you clicked. If you start a slow action like scanning a card, the browser should keep that original field in mind. Here, it instead looked up the field again after the scan, and a malicious page could swap in its own hidden field in the meantime, so your card details went to the attacker.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.