Use after free in Forms (CVE-2026-15126)
A range input can fire a change event synchronously while an atomic DOM move is in progress, letting script run during a window where frame-detachment checks are bypassed. An attacker could then remove an iframe and leave it orphaned in the frame tree, which the report says historically leads to use-after-free and renderer compromise.
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: The moveBefore() API sets a StatePreservingAtomicMoveInProgress flag to suppress script execution and frame detachment. However, if a range input becomes disabled during the move, a 'change' event is dispatched synchronously, allowing JavaScript to execute while security invariants are suspended.
Affected files:
third_party/blink/renderer/core/html/forms/range_input_type.cc
Estimated timestamp from git blame: Unknown (Google3 checkout)
Summary
A potential vulnerability in Blink allows synchronous JavaScript execution during an atomic DOM move (the moveBefore() API). When an <input type="range"> is moved such that its disabled state changes (e.g., inside a disabled <fieldset>), it may trigger a change event synchronously. This violates the StatePreservingAtomicMoveInProgress invariant, which is designed to ensure that no script runs during the atomic operation. Executing script while this flag is active allows an attacker to bypass security checks and cause Use-After-Free (UAF) via orphaned frames.
Technical Details
When the moveBefore() API is invoked, Node::moveBefore() sets the StatePreservingAtomicMoveInProgress flag on the Document. During the insertion phase, ChildrenChanged() is called on ancestor elements.
If the parent is an HTMLFieldSetElement, HTMLFieldSetElement::ChildrenChanged() iterates over its descendants to update their disabled state. If a <input type="range"> transitions to a disabled state, it calls RangeInputType::DisabledAttributeChanged(). This method unconditionally calls GetSliderThumbElement()->StopDragging().
SliderThumbElement::StopDragging() terminates the drag and invokes HostInput()->DispatchFormControlChangeEvent(). Because moveBefore() intentionally does not establish an EventQueueScope (under the assumption that no script can run during atomic moves), the ScopedEventQueue has a scoping level of 0. Consequently, ScopedEventQueue::EnqueueEvent() falls back to synchronous dispatch via EventDispatcher::DispatchEvent().
Impact
The StatePreservingAtomicMoveInProgress flag is used to bypass critical security checks in HTMLFrameOwnerElement and ChildFrameDisconnector. It assumes the DOM is in a controlled, intermediate state. By executing a change event listener during this window, an attacker can manipulate the DOM (e.g., iframe.remove()). The frame is removed from the DOM tree, but because the flag is true, ClearContentFrame() and ChildFrameDisconnector are bypassed. This leaves the frame detached from the DOM but still active in the FrameTree (an orphaned frame), which historically leads to Use-After-Free (UAF) and renderer compromise.
Potential Attack Scenario
Note: These are suggested steps; our tooling agent does not have the ability to run code to confirm a working PoC.
- An attacker creates a disabled
<fieldset>containing a<legend>(L1). InsideL1, they place an<input type="range" id="slider">(which remains enabled per HTML spec). - The attacker creates an unrelated
<iframe>elsewhere in the document to target for orphaning. - The attacker adds a
changeevent listener to thesliderthat callsiframe.remove(). - The user clicks and drags the slider thumb (
mousedown), initiatingin_drag_mode_. - During the drag, a
mousemovelistener on the document executes. It callsfieldset.moveBefore(L0, L1)to insert a new legendL0beforeL1. - During the atomic move,
L1is no longer the first legend, so the<fieldset>disabled state now applies to theslider. HTMLFieldSetElement::ChildrenChanged()updates the slider to disabled.StopDragging()is called, which synchronously fires thechangeevent.- The attacker's
changeevent listener executes whileStatePreservingAtomicMoveInProgressistrue. - The
iframe.remove()call succeeds, but frame detachment is bypassed, creating an orphaned frame.
Recommendation
Modify RangeInputType::DisabledAttributeChanged() or SliderThumbElement::StopDragging() to queue the event if an atomic move is in progress, or wrap the moveBefore() insertion logic in an EventQueueScope to ensure events dispatched during DOM mutations are deferred until the atomic move completes.
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-state update path for a range input dispatches a change event synchronously, and moveBefore() does not defer events, so script runs while the atomic-move flag is set.
Impact
An attacker could leave a frame detached from the DOM but still active in the frame tree, which the report says historically leads to use-after-free and renderer compromise; the scenario is suggested and was not confirmed by running code.
What the attacker needed
Victim drags a slider thumb; page script controls the DOM; browser supports moveBefore()
The fix
The report recommends queueing the event when an atomic move is in progress, or wrapping the moveBefore() insertion in an EventQueueScope so events are deferred until the move completes.
How it was found
- Create a disabled fieldset with a legend containing an enabled range input, plus a separate iframe.
- Add a change listener on the slider that removes the iframe.
- Start dragging the slider thumb with a mousedown.
- During the drag, a mousemove handler calls moveBefore() to insert a new legend before the existing one.
- The fieldset's disabled state now applies to the slider, so StopDragging() fires the change event synchronously.
- The change listener removes the iframe while the atomic-move flag is true, leaving an orphaned 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.
Browsers sometimes move parts of a page around in one step and assume no page script will run until the move finishes. Here a slider input could still fire a 'change' event in the middle of that move, so the page's own code ran at a moment the browser thought was safe. That let the page remove a frame while the browser's safety checks were switched off, leaving the frame half-detached, which can crash or corrupt the browser.
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.