Inappropriate implementation in Forms (CVE-2026-15128)
A missing event queue scope in the text field input type lets a change event fire synchronously while an atomic DOM move is in progress. An attacker could use that window to remove a cross-origin iframe in a way that skips frame disconnection, leaving a detached but still active frame and bypassing site isolation.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 25 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 missing event queue scope in TextFieldInputType allows synchronous change events to fire when a spin button becomes disabled during a moveBefore operation. This synchronous script execution occurs while StatePreservingAtomicMoveInProgress is true, allowing an attacker to bypass ChildFrameDisconnector and create a detached but active iframe.
Affected files:
third_party/blink/renderer/core/html/forms/text_field_input_type.cc
Estimated timestamp from git blame: Unknown (Google3 checkout)
Summary
A potential Universal Cross-Site Scripting (UXSS) vulnerability exists due to a bypass of the StatePreservingAtomicMoveInProgress flag during atomic DOM moves (via the moveBefore API).
When an input element with a spin button (<input type="number">) changes its disabled state, it releases mouse capture and dispatches a change event. If this state change is triggered by a moveBefore operation (e.g., reordering <legend> elements in a disabled <fieldset>), the change event is dispatched synchronously because TextFieldInputType::DisabledOrReadonlyAttributeChanged lacks an EventQueueScope.
Because EventDispatchForbiddenScope does not block execution in production builds, attacker-controlled JavaScript can execute while the document's StatePreservingAtomicMoveInProgress flag is globally true. The attacker can use this window to call iframe.remove(). The removal logic in ContainerNode::RemoveChild checks the atomic move flag and skips ChildFrameDisconnector, resulting in a detached but active iframe.
Potential Exploit Scenario
(Note: These are suggested steps based on static analysis; a working proof-of-concept has not been executed).
- Setup: An attacker creates a page with a disabled
<fieldset>containing multiple<legend>elements. In the first<legend>, they place an<input type="number">. By HTML specification, this input is enabled because it resides in the first legend. - Target: The attacker creates a cross-origin
<iframe>in the document. - Event Listener: The attacker attaches a
changeevent listener to the<input>. - Interaction: The user clicks and holds the spin button on the input. This changes the input's value and sets
capturing_ = trueinSpinButtonElement. - Atomic Move: While capture is held, the attacker's script initiates a DOM move:
fieldset.moveBefore(secondLegend, firstLegend). - Flag Set:
Node::moveBeforesetsGetDocument().SetStatePreservingAtomicMoveInProgress(true)to protect the DOM during the transition. - State Change:
moveBeforecallsinsertBefore. During the insertion phase,HTMLFieldSetElement::ChildrenChangedrecalculates descendant states. Because the input is no longer in the first legend, it becomes disabled. - Synchronous Event:
TextFieldInputType::DisabledOrReadonlyAttributeChangedis called. It commands the spin button toReleaseCapture(), which synchronously dispatches thechangeevent. In production,EventDispatchForbiddenScopeis a no-op, and without anEventQueueScope, the event executes immediately. - Bypassing Disconnection: Inside the
changeevent listener, the attacker callsiframe.remove(). - Detached Iframe:
ContainerNode::RemoveChildexecutes. It observes thatStatePreservingAtomicMoveInProgress()is true, and therefore skips theChildFrameDisconnector. The iframe is removed from the DOM tree, but its underlying frame remains connected and active, bypassing Site Isolation.
Root Cause Analysis
In third_party/blink/renderer/core/html/forms/text_field_input_type.cc, the DisabledOrReadonlyAttributeChanged function lacks an EventQueueScope:
void TextFieldInputType::DisabledOrReadonlyAttributeChanged() {
if (SpinButtonElement* spin_button = GetSpinButtonElement())
spin_button->ReleaseCapture(); // Dispatches event synchronously
UpdateWheelEventRegistration(/*is_detaching=*/false);
}
Other similar methods in Blink (like MultipleFieldsTemporalInputTypeView::DisabledAttributeChanged) correctly instantiate an EventQueueScope to defer events when the element state changes programmatically during a broader DOM operation.
Recommended Fix
- Queue Events: Introduce an
EventQueueScopeinTextFieldInputType::DisabledOrReadonlyAttributeChanged(and potentiallyReadonlyAttributeChanged/DisabledAttributeChanged) to ensure thatchangeevents triggered by capture release are deferred until the current DOM mutation is complete.
void TextFieldInputType::DisabledOrReadonlyAttributeChanged() {
EventQueueScope scope;
if (SpinButtonElement* spin_button = GetSpinButtonElement())
spin_button->ReleaseCapture();
UpdateWheelEventRegistration(/*is_detaching=*/false);
}
- Check Atomic Move State: Alternatively, or additionally,
TextFieldInputTypeorSpinButtonElementcould verify!GetElement().GetDocument().StatePreservingAtomicMoveInProgress()before dispatching events or releasing capture.
Evaluated with Chrome root at commit: 65b3256311f3ab6fb9870eaa522de7e6dd2663bb
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 disabled-or-readonly handler releases mouse capture without an event queue scope, so the resulting change event runs synchronously in the middle of an atomic DOM move.
Impact
The text claims this could bypass site isolation and yield universal cross-site scripting, but it is a static-analysis hypothesis with no working proof of concept.
What the attacker needed
Victim visits attacker page; victim presses and holds spin button; attacker script runs on the page
The fix
An event queue scope should be added to the handler so the change event is deferred until the DOM mutation finishes, and the atomic move state could also be checked before dispatching.
How it was found
- Create a disabled fieldset with several legend elements and a number input inside the first legend.
- Add a cross-origin iframe and a change listener on the input.
- Have the user press and hold the spin button so capture is held.
- Trigger an atomic move of the legends while capture is held.
- The input becomes disabled and the change event fires synchronously.
- In the listener, remove the iframe so it is detached but still active.
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.
Browsers keep pages from different websites apart so one site cannot reach into another. This report suggests a timing gap in the browser's own code where a script can run at a moment the browser assumes nothing is running, and use it to detach a frame from the page while the frame keeps working. The report is based on reading the code only; nobody has actually built and run an exploit.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.