Insufficient policy enforcement in Autofill (CVE-2026-10950)
A logic flaw in iOS Autofill means that when a suspicious frame is isolated for spoofing another frame's token, its pending asynchronous child-frame registration callback can still run and re-insert it into the cross-frame autofill tree. A malicious frame could then take part in cross-frame filling and potentially intercept sensitive data such as credit card details entered in a legitimate frame.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 43 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 logic flaw in iOS Autofill allows an isolated malicious iframe to resurrect itself and bypass anti-spoofing mitigations. Because AutofillDriverIOS::Unregister() fails to invalidate its WeakPtrFactory or check the unregistered_ flag in subsequent async callbacks, a compromised frame can re-insert itself into the global Autofill tree. This potentially allows the malicious frame to intercept sensitive cross-origin autofill data.
Affected files:
components/autofill/ios/browser/autofill_driver_ios.mmcomponents/autofill/ios/browser/autofill_driver_ios.hios/chrome/browser/autofill/model/autofill_tab_helper.mm
Estimated timestamp from git blame: 2024-07-25
Background
In iOS Autofill, cross-iframe filling (kAutofillAcrossIframesIos) relies on a security isolation mechanism to combat frame spoofing. If AutofillTabHelper::OnDidDoubleRegistration detects multiple frames claiming the same remote token, it assumes a spoofing attack and calls AutofillDriverIOS::Unregister() on the suspicious driver. This removes the driver's FrameData node from the FormForest tree, preventing it from participating in cross-frame filling.
Vulnerability
There is a potential bypass of this isolation mechanism due to inadequate cleanup in AutofillDriverIOS::Unregister().
When a frame reports forms containing nested child frames, AutofillDriverIOS::FormsSeen registers an asynchronous callback with the ChildFrameRegistrar. This callback is bound to AutofillDriverIOS::SetSelfAsParent and securely captures the driver using a base::WeakPtr.
When AutofillTabHelper isolates a driver via Unregister(), it sets an internal unregistered_ = true flag and removes the driver from the router. However, it does not invalidate the driver's weak_ptr_factory_ nor does it clear its parent_ pointer.
Because the weak pointers remain valid, any pending child frame registration callbacks belonging to the isolated driver can still execute. When SetSelfAsParent executes, it fails to check the unregistered_ flag and proceeds to call router_->FormsSeen(...), passing the isolated driver back into the system.
FormForest::UpdateTreeOfRendererForm actively recreates the previously erased FrameData node. Because the driver's parent_ pointer was never cleared, FormForest successfully asks the top-level parent document to re-extract forms, seamlessly linking the isolated malicious frame back into the cross-origin form tree.
Potential Exploitation Steps
An attacker controlling a top-level page and an iframe (Frame A) could potentially trigger this bypass:
- Callback Creation: Frame A embeds its own child iframe (Frame C). Frame A extracts its forms and sends them to the browser, which creates a pending registration callback for Frame C's token bound to Frame A's driver.
- Spoofing Attack: The attacker reads the
__gCrChildFrameRemoteTokenof a legitimate cross-origin iframe (Frame B) from the parent DOM and uses Frame A to register mapping to Frame B's token. - Isolation: Frame B registers its legitimate mapping.
ChildFrameRegistrardetects double registration for Frame B's token, invalidates the token, and isolates Frame A by callingUnregister()on its driver. - Zombie Execution: Frame C finally loads and registers its token mapping.
ChildFrameRegistrarexecutes the pending callback from step 1. - Tree Re-insertion: The callback invokes
SetSelfAsParenton the isolated Frame A driver. Without anunregistered_check, the driver callsrouter_->FormsSeen, which recreates Frame A's node inFormForest. - Relinking:
FormForestcallsGetParent()on Frame A's driver, triggering a re-extraction in the top-level document that fully wires the resurrected Frame A back into the Autofill tree.
Once resurrected, Frame A can participate in cross-frame filling and potentially intercept sensitive user data (like credit cards) filled into the legitimate parent frame.
Suggested Fix
- In
AutofillDriverIOS::Unregister(), explicitly invalidate the weak pointers to prevent asynchronous callbacks from executing on isolated drivers:weak_ptr_factory_.InvalidateWeakPtrs(); - As a defense-in-depth measure, add an explicit check at the beginning of
AutofillDriverIOS::SetSelfAsParentto return early ifunregistered_is true. - Consider explicitly clearing
parent_inUnregister()to sever ties with the form tree hierarchy.
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.
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 Unregister() set the unregistered_ flag and removed the driver from the router but did not invalidate its weak pointers or clear its parent_ pointer, so a pending child-frame registration callback could still call back into the router and recreate the frame's node.
Impact
Once resurrected, the frame could participate in cross-frame filling and potentially intercept sensitive user data such as credit cards filled into the legitimate parent frame; the text presents this as a potential issue and notes the project's deductions may be wrong.
What the attacker needed
Attacker controls top-level page and a frame; victim uses iOS Chrome autofill; cross-iframe autofill feature enabled
The fix
The suggested fix is to invalidate the driver's weak pointers in Unregister(), add an early return in SetSelfAsParent when unregistered_ is true, and consider clearing parent_; the text does not say it was fixed.
How it was found
- Frame A embeds a child iframe (Frame C) and sends its forms, creating a pending registration callback for Frame C's token bound to Frame A's driver.
- The attacker reads a legitimate cross-origin iframe's child frame remote token from the parent DOM and has Frame A register a mapping to that token.
- The legitimate frame registers its own mapping, the double registration is detected, and Frame A's driver is isolated via Unregister().
- Frame C loads and registers its token mapping, so the pending callback from the first step executes.
- The callback calls SetSelfAsParent on the isolated driver, which calls into the router and recreates Frame A's node in the form tree.
- The form tree asks the top-level document to re-extract forms, wiring the resurrected Frame A back into the autofill tree.
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 can fill a form in one frame using data from another frame on the page, so the browser must be sure which frame is which. When two frames claim the same identity, the browser treats it as spoofing and removes the suspicious one. Here the removal was incomplete: a delayed callback still ran and quietly put the removed frame back, so it could sit alongside a real frame and see data meant for it.
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.