Skip to content
XSS Advisory Advanced CVE-2026-15125

Inappropriate implementation in Forms (CVE-2026-15125)

A flaw in the temporal input form control allows author JavaScript to run synchronously during an atomic DOM move, breaking an invariant that should prevent script execution. An attacker could use this to remove an iframe without disconnecting its frame, potentially leading to universal cross-site scripting or use-after-free.

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 vulnerability in MultipleFieldsTemporalInputTypeView allows author JavaScript to execute synchronously during an atomic DOM move (moveBefore()). This violates the StatePreservingAtomicMoveInProgress invariant, enabling an attacker to remove an iframe without disconnecting its underlying frame, leading to a potential Universal Cross-Site Scripting (UXSS) or Use-After-Free (UAF) primitive.

Affected files:

  • third_party/blink/renderer/core/html/forms/multiple_fields_temporal_input_type_view.cc

Estimated timestamp from git blame: Unknown (Google3 checkout)

Root Cause

The moveBefore() API performs state-preserving atomic DOM moves. To ensure DOM consistency, Blink enforces an invariant that author script must not execute while an atomic move is in progress. This is managed by the StatePreservingAtomicMoveInProgress flag.

However, this invariant can be bypassed due to event handling in MultipleFieldsTemporalInputTypeView::DisabledAttributeChanged():

C++
void MultipleFieldsTemporalInputTypeView::DisabledAttributeChanged() {
  EventQueueScope scope;
  if (SpinButtonElement* spin_button = GetSpinButtonElement())
    spin_button->ReleaseCapture();
  if (DateTimeEditElement* edit = GetDateTimeEditElement())
    edit->DisabledStateChanged();
} // <-- EventQueueScope destructs here

When moveBefore() is called, it does not wrap its execution in an outer EventQueueScope. If the move triggers a disabled state recalculation (e.g., moving a <legend> inside a <fieldset>), DisabledAttributeChanged() is reached. This method declares a local EventQueueScope and calls ReleaseCapture() on the input's spin button.

If the spin button currently holds pointer capture, ReleaseCapture() queues a change event. Because there is no outer EventQueueScope active from moveBefore(), the destruction of the local EventQueueScope at the end of the method causes ScopedEventQueue::DispatchAllEvents() to fire, synchronously dispatching the change event to JavaScript.

Attack Scenario (Potential Steps)

An attacker could potentially trigger this vulnerability using the following steps:

  1. Create a document with a disabled <fieldset>. Inside it, place a <legend> containing a temporal input (e.g., <input type="date">). Due to the HTML first-legend exemption, the input remains enabled.
  2. Embed a target <iframe> elsewhere in the document.
  3. Register a change event listener on the <input> that executes iframe.remove().
  4. Induce the user to interact with the input's spin button (up/down arrows). This modifies the value and causes the spin button to acquire pointer capture (capturing_ = true).
  5. Using a macro-task (e.g., setTimeout(..., 0) scheduled during a mousedown handler), trigger an atomic move: fieldset.moveBefore(legend, null).
  6. moveBefore() sets StatePreservingAtomicMoveInProgress() to true and performs the insertion.
  7. ContainerNode::DidInsertNodeVector() triggers HTMLFieldSetElement::ChildrenChanged(), which recalculates descendant disabled states and eventually calls MultipleFieldsTemporalInputTypeView::DisabledAttributeChanged().
  8. The local EventQueueScope is created, ReleaseCapture() queues a change event, and the local scope's destruction flushes the queue synchronously.
  9. The attacker's change event listener fires while StatePreservingAtomicMoveInProgress() is still true.
  10. The script calls iframe.remove(). Inside ContainerNode::WillRemoveChild(), the iframe disconnection logic (ChildFrameDisconnector::Disconnect()) is explicitly skipped because StatePreservingAtomicMoveInProgress() is true.

Impact

Removing an iframe without disconnecting its underlying frame is a well-known, powerful primitive. It leaves a live, active LocalFrame attached to a detached element, reliably leading to Universal Cross-Site Scripting (UXSS) and Use-After-Free (UAF) memory corruption vulnerabilities within the renderer process.

Suggested Fix

Prevent synchronous event dispatch during atomic moves. This could be achieved by checking StatePreservingAtomicMoveInProgress() before releasing the spin button capture, or by ensuring that ReleaseCapture() uses kEventDispatchDisallowed when an atomic move is in progress. Alternatively, moveBefore() operations could be wrapped in a broader EventQueueScope to defer all event dispatching until the atomic move is fully complete and the invariant flag is cleared.

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 `DisabledAttributeChanged()` method creates a local event queue scope that flushes queued events synchronously, and because `moveBefore()` does not wrap its operation in an outer event queue scope, a `change` event can be dispatched while the atomic move is still in progress.

Impact

Removing an iframe without disconnecting its frame could lead to universal cross-site scripting and use-after-free memory corruption within the renderer process.

What the attacker needed

Victim interacts with spin button; attacker-controlled page

The fix

The issue should be fixed by preventing synchronous event dispatch during atomic moves, for example by checking the atomic move flag before releasing capture or by wrapping move operations in an event queue scope.

How it was found

  1. Create a document with a disabled fieldset containing a legend with a temporal input, and an iframe elsewhere.
  2. Register a change event listener on the input that removes the iframe.
  3. Have the user interact with the input's spin button so it acquires pointer capture.
  4. Use a macro-task to trigger an atomic move of the legend within the fieldset.
  5. The move causes a disabled state recalculation that releases pointer capture and synchronously dispatches a change event.
  6. The change listener runs while the atomic move is still in progress and removes the iframe without disconnecting its 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.

When a web page moves an element around in its structure, the browser tries to keep things consistent by not letting any page scripts run in the middle of that move. This report found a way to sneak a script in during that move by using a date input's spin button. If a script runs at the wrong moment, it can detach an iframe from the page but leave its content still active, which can let an attacker run code in other sites.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.