Skip to content
Memory corruption Advisory Advanced CVE-2026-10951

Use after free in Autofill (CVE-2026-10951)

A use-after-free flaw in Chrome's iOS autofill handler occurs when the last Incognito tab is closed while a Face ID prompt is pending, leaving a dangling pointer to the destroyed WebStateList. An attacker could exploit this to potentially achieve remote code execution or sandbox escape in the browser process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 42 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 without the Chrome Security team. Please see go/chrome-ai-generated-security-bugs-faq for more information.

Overview: A Use-After-Free vulnerability exists in ManualFillInjectionHandler on iOS when Face ID is required for autofill. The handler strongly captures self in the re-authentication block while holding an unsafe raw pointer (assign) to a WebStateList. If the last Incognito tab is closed by a script while the Face ID prompt is pending, the WebStateList is destroyed, leading to a UAF when the callback executes.

Affected files:

  • ios/chrome/browser/autofill/ui_bundled/manual_fill/manual_fill_injection_handler.mm

Estimated timestamp from git blame: 2024-07-24

Summary

A Use-After-Free (UAF) vulnerability exists in ManualFillInjectionHandler on iOS. The handler holds a raw pointer to a WebStateList and captures self strongly in the completion block for Face ID / Touch ID re-authentication. If the WebStateList is destroyed (e.g., when the last Incognito tab is closed) while the system authentication prompt is pending, the handler remains alive via the strong reference and dereferences the dangling WebStateList pointer when the callback eventually executes.

Technical Details

In ios/chrome/browser/autofill/ui_bundled/manual_fill/manual_fill_injection_handler.mm, the ManualFillInjectionHandler class holds a raw pointer to WebStateList via an Objective-C assign property:

OBJC
@property(nonatomic, assign) WebStateList* webStateList;

Because WebStateList is a C++ object, assign acts as a raw pointer without ARC tracking or zeroing behavior.

In autofillFormWithCredential:shouldReauth:, the completion block for re-authentication captures self strongly:

OBJC
auto completionHandler = ^(ReauthenticationResult result) {
  if (result != ReauthenticationResult::kFailure) {
    [self fillFormWithCredential:credential];
  }
};

When attemptReauthWithLocalizedReason:... is called, the system Face ID prompt is presented. This prompt is out-of-process and does not pause JavaScript execution in the background WKWebView.

If the active tab is closed via JavaScript (window.close()) while the prompt is visible, and it is the last Incognito tab, the OffTheRecord Profile is destroyed. This destroys the Browser and its associated WebStateList. However, the pending Face ID block keeps the ManualFillInjectionHandler alive.

Once the user successfully authenticates, the block executes and calls fillFormWithCredential:, which immediately attempts to access the destroyed WebStateList:

OBJC
web::WebState* activeWebState = self.webStateList->GetActiveWebState();

This results in a Use-After-Free in the browser process.

Potential Exploitation Scenario

Note: These are potential steps as our tooling cannot currently run live code to provide a functional PoC.

  1. An attacker tricks a user into opening an Incognito tab (e.g. A.html).
  2. The user clicks a link in A.html that triggers window.open('B.html'), opening a new Incognito tab. Because it was opened via script, WebKit allows B.html to later call window.close() on itself.
  3. The attacker socially engineers the user into manually closing A.html (e.g., "Please close other tabs for security"), leaving B.html as the sole Incognito tab.
  4. B.html presents a fake login form.
  5. The user taps the form, triggering Chrome's manual autofill accessory.
  6. The page's JavaScript detects the focus and starts a timer: setTimeout(function() { window.close(); }, 5000);.
  7. The user selects a credential, triggering the Face ID prompt.
  8. While the prompt is active, the timer fires and B.html closes itself. Since it was the last Incognito tab, the WebStateList is destroyed.
  9. The user completes Face ID. The callback executes, dereferences the dangling WebStateList, and triggers the UAF, potentially leading to Remote Code Execution / Sandbox Escape in the browser process if the heap was groomed.

Recommended Fix

  1. Use Weak Capture: The completionHandler in autofillFormWithCredential:shouldReauth: and the block in fillLastSelectedFieldWithString: should capture self weakly (__weak __typeof(self) weakSelf = self;) to prevent the handler from outliving its owner.
  2. Safe Pointers: Change the webStateList property from assign to a safer construct. If using a raw pointer is necessary, the class should observe the destruction of the WebStateList (or its owning Browser) and clear the pointer before it becomes dangling.

Evaluated with Chrome root at commit: 4a3e9db74111a3c6c4b3acfd70050a05077cf27a


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

The ManualFillInjectionHandler holds a raw (assign) pointer to WebStateList and strongly captures self in the re-authentication completion block, so the handler outlives the WebStateList and dereferences a dangling pointer.

Impact

The use-after-free could potentially lead to remote code execution or sandbox escape in the browser process if the heap is groomed.

What the attacker needed

IOS device with Face ID/Touch ID; Incognito mode; victim opens attacker page; victim uses autofill

The fix

The completion handler should capture self weakly, and the webStateList property should be changed from assign to a safer construct or the class should observe its destruction and clear the pointer.

How it was found

  1. Attacker tricks user into opening an Incognito tab (A.html).
  2. User clicks a link that opens a new Incognito tab (B.html) via script, allowing B.html to close itself later.
  3. Attacker socially engineers user to close A.html, leaving B.html as the only Incognito tab.
  4. B.html shows a fake login form; user taps it to trigger autofill.
  5. Page JavaScript sets a timer to close B.html after a delay.
  6. User selects a credential, Face ID prompt appears; timer fires, B.html closes, destroying WebStateList; user completes Face ID, callback dereferences dangling pointer causing UAF.

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.

This report describes a memory safety bug in Chrome on iOS. When you use autofill and Face ID is required, Chrome holds onto a reference to the list of open tabs. If that list is destroyed (for example, by closing the last Incognito tab) while the Face ID prompt is still showing, Chrome later tries to use the now-freed memory, which can crash or be exploited.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.