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

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.

  1. An attacker creates a disabled <fieldset> containing a <legend> (L1). Inside L1, they place an <input type="range" id="slider"> (which remains enabled per HTML spec).
  2. The attacker creates an unrelated <iframe> elsewhere in the document to target for orphaning.
  3. The attacker adds a change event listener to the slider that calls iframe.remove().
  4. The user clicks and drags the slider thumb (mousedown), initiating in_drag_mode_.
  5. During the drag, a mousemove listener on the document executes. It calls fieldset.moveBefore(L0, L1) to insert a new legend L0 before L1.
  6. During the atomic move, L1 is no longer the first legend, so the <fieldset> disabled state now applies to the slider.
  7. HTMLFieldSetElement::ChildrenChanged() updates the slider to disabled. StopDragging() is called, which synchronously fires the change event.
  8. The attacker's change event listener executes while StatePreservingAtomicMoveInProgress is true.
  9. 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.

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 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

  1. Create a disabled fieldset with a legend containing an enabled range input, plus a separate iframe.
  2. Add a change listener on the slider that removes the iframe.
  3. Start dragging the slider thumb with a mousedown.
  4. During the drag, a mousemove handler calls moveBefore() to insert a new legend before the existing one.
  5. The fieldset's disabled state now applies to the slider, so StopDragging() fires the change event synchronously.
  6. 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.

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.