Insufficient validation of untrusted input in DevTools (CVE-2026-10916)
The browser process accepts DevTools session state updates from an untrusted renderer without validation and forwards them to a new cross-origin renderer during navigation. An attacker who compromises a renderer could inject a script that executes in the victim origin's context, achieving universal cross-site scripting.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A compromised renderer can inject malicious session state into an active DevTools session via the DevToolsSessionHost Mojo interface. This unvalidated state is forwarded by the browser to a new, cross-origin renderer upon navigation. The victim renderer then faithfully restores this state, potentially allowing the attacker to execute arbitrary JavaScript in the new origin's context.
Affected files:
content/browser/devtools/devtools_session.ccthird_party/blink/renderer/core/inspector/inspector_page_agent.cccontent/browser/devtools/devtools_renderer_channel.ccthird_party/blink/renderer/core/inspector/inspector_session_state.h
Estimated timestamp from git blame: 2019-04-25
Description
There is a potential Site Isolation bypass and Universal Cross-Site Scripting (UXSS) vulnerability in Chrome's DevTools architecture. The issue stems from the browser process blindly accepting and persisting DevTools session state updates from an untrusted renderer process, and then forwarding that poisoned state to a new, cross-origin renderer during navigation.
Technical Details
- State Poisoning via Mojo: In
content/browser/devtools/devtools_session.cc, theDevToolsSessionclass maintains asession_state_cookie_. When a renderer sends a state update via theDevToolsSessionHostMojo interface (e.g.,DispatchProtocolNotification), the browser callsApplySessionStateUpdates. This function iterates over theupdates->entriesand merges them directly intosession_state_cookie_without any validation or sanitization. - Cross-Origin Forwarding: When the tab navigates to a new origin, Site Isolation creates a new renderer process. To maintain the DevTools connection,
DevToolsRendererChannel::SetRendererInternalinvokesAttachToAgent. This calls theAttachDevToolsSessionMojo method on the new renderer'sDevToolsAgent, passing the poisonedsession_state_cookie_. - State Restoration and Execution: In the new victim renderer,
InspectorSessionStatedecodes the provided cookie. TheInspectorPageAgentbinds its state fields to deterministic keys based on initialization order:- Index 2 (
"Page.2/") maps to theenabled_boolean. - Index 7 (
"Page.7/") maps to thescripts_to_evaluate_on_load_string map.
- Index 2 (
By supplying a CBOR-encoded true for "Page.2/" and a malicious JavaScript payload for "Page.7/1", an attacker can force the victim renderer to enable the InspectorPageAgent and register a script to run on load. When InspectorPageAgent::DidCreateMainWorldContext fires for the new origin, it blindly executes the attacker's injected script in the context of the victim's main world.
Potential Reproduction Steps
(Note: Our tooling agent does not currently have the ability to run code, so these are suggested steps based on static analysis.)
- A user has a DevTools client (e.g., DevTools frontend, an extension using
chrome.debugger, or Puppeteer) attached to a tab visitinghttps://attacker.com. - The attacker achieves RCE to compromise the renderer process for
attacker.com. - Using the compromised renderer's
DevToolsSessionHostMojo remote, the attacker callsDispatchProtocolNotificationwith a craftedupdatesmap containing:"Page.2/":[0xf5](CBOR encoding fortrue)"Page.7/1": CBOR-encoded string containing malicious JavaScript (e.g.,alert(document.domain)).
- The user or the attacker's script navigates the tab to
https://victim.com. - The browser spins up a new renderer for
victim.com, passing the poisoned state cookie during DevTools attachment. - The injected JavaScript executes in the context of
victim.comonce the document commits and its main world context is created.
Suggested Fix
The browser process should not blindly trust DevToolsSessionState updates from the renderer, especially when those updates will be forwarded across process boundaries.
Potential remediations include:
- Browser-Side State Management: Sensitive DevTools state (like scripts to evaluate on load or agent enablement statuses) should be managed authoritatively in the browser process rather than round-tripping through the renderer's
session_state_cookie_. - State Validation: Implement strict validation in
DevToolsSession::ApplySessionStateUpdatesto ensure that a compromised renderer cannot modify sensitive keys or inject arbitrary scripts. - Origin Scoping: Clear or heavily filter the
session_state_cookie_upon cross-process navigation to ensure origin-specific configurations do not leak or compromise a new renderer.
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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 the browser process merges renderer-supplied DevTools session state into its stored cookie without validating which keys or values are allowed, then passes that state to a new renderer on cross-origin navigation.
Impact
An attacker who already controls a renderer could execute arbitrary JavaScript in a different origin, bypassing Site Isolation, but only while a DevTools client is attached to the tab.
What the attacker needed
DevTools client attached to the tab; Attacker can compromise a renderer process; Victim navigates to another origin
The fix
The browser should manage sensitive DevTools state authoritatively, validate state updates from renderers, and clear or filter the session state cookie on cross-process navigation.
How it was found
- A DevTools client is attached to a tab visiting the attacker's site.
- The attacker compromises the renderer process for that site.
- The compromised renderer sends a crafted state update through the DevTools session host interface.
- The tab navigates to the victim site, creating a new renderer.
- The browser passes the poisoned state cookie to the new renderer during DevTools attachment.
- The injected script runs in the victim site's main world when the document loads.
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 you use browser developer tools, the browser and the page's process share some session settings. This report says a malicious page process could tamper with those settings so that, after you navigate to another site, the browser runs attacker-supplied JavaScript there. That would let the attacker read or change data on the other site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.