Insufficient validation of untrusted input in DevTools (CVE-2026-11022)
In flattened Chrome DevTools Protocol mode, the browser forwards renderer-originated messages to the root client without validating or adding the top-level sessionId. A compromised renderer can omit this field to spoof browser-level events, tricking automation clients into sending cross-origin commands to the attacker's session.
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: In flattened Chrome DevTools Protocol (CDP) mode, the browser forwards DevTools messages from the renderer to the root client without validating or enforcing the top-level sessionId. A compromised renderer can omit this field to spoof browser-level events (like Target.attachedToTarget), tricking DevTools automation clients into sending cross-origin commands to the attacker's session.
Affected files:
content/browser/devtools/devtools_session.cccontent/browser/devtools/protocol/target_handler.ccchrome/browser/extensions/api/debugger/debugger_api.cc
Estimated timestamp from git blame: 2025-05-25
Summary
When a DevTools client (such as Puppeteer or Playwright) connects using flattened CDP mode (Target.setAutoAttach({flatten: true})), it receives messages from all attached child targets through the root browser session. These messages are distinguished by a top-level sessionId field.
Currently, when the browser receives a protocol notification from a renderer via Mojo (content::DevToolsSession::DispatchProtocolNotification), it forwards the raw message data directly to the client via DispatchProtocolResponseOrNotification. As noted in the source code comments, the browser deliberately avoids parsing these messages to protect itself from potentially malicious payloads.
However, because the browser does not parse the message, it also fails to enforce or append the correct top-level sessionId. A compromised renderer can exploit this by crafting a raw CDP message that intentionally omits the top-level sessionId but contains a spoofed browser-level event, such as Target.attachedToTarget.
When the root DevTools client receives this message without a top-level sessionId, it interprets the event as originating from the root browser session. The attacker can supply a sensitive URL (e.g., https://accounts.google.com) and their own legitimate sessionId inside the event's params. The automation script will then associate the sensitive URL with the attacker's sessionId and route subsequent cross-origin commands (like Input.dispatchKeyEvent or Runtime.evaluate) directly to the compromised renderer, leading to data and credential hijacking.
Potential Attack Scenario
Note: These are suggested steps for how an attacker might trigger the vulnerability. Our tooling agent does not have the ability to run code or provide a working proof-of-concept.
- A DevTools automation client connects to the browser with flattened protocol mode enabled and attaches to a target web page (e.g.,
https://attacker.com). - The browser assigns a child
sessionId(e.g.,SESSION_A) and establishes a Mojo connection to the renderer hostinghttps://attacker.com. - The attacker compromises the renderer process at
https://attacker.com(e.g., via a V8 memory corruption vulnerability). - The compromised renderer bypasses the standard Blink DevTools serialization and directly crafts a raw
Target.attachedToTargetCDP message. - The attacker deliberately omits the top-level
sessionIdfield from the crafted payload, but includesSESSION_Aand a fake, sensitive URL in theparamsobject:{"method": "Target.attachedToTarget", "params": {"sessionId": "SESSION_A", "targetInfo": {"url": "https://sensitive-site.com", ...}}} - The compromised renderer sends this raw payload to the browser via the
host_remote_->DispatchProtocolNotificationMojo call. - The browser's
content::DevToolsSession::DispatchProtocolNotificationreceives the message and forwards it directly to the root client without validating or appending thesessionId. - The DevTools client receives the message. Lacking a top-level
sessionId, it processes it as a legitimate root-level event, believing a new target has been attached athttps://sensitive-site.comwithsessionIdSESSION_A. - The automation script sends commands intended for the sensitive site. The DevTools client wraps these commands with
sessionId: SESSION_A. - The browser routes these commands back to the attacker's compromised renderer, allowing the attacker to intercept passwords or execute arbitrary JavaScript in the context of the automation script's logic.
Suggested Fix
The browser process must enforce the presence and correctness of the top-level sessionId for all messages originating from child sessions before forwarding them to the root client.
Even if full parsing is avoided for performance and security reasons, the browser should forcefully inject or overwrite the sessionId in the raw JSON/CBOR payload using crdtp utilities. This approach is already used for browser-originated messages in DevToolsSession::DispatchProtocolMessageToClient (via crdtp::cbor::AppendString8EntryToCBORMap). Applying a similar mandatory enforcement to renderer-originated messages in DispatchProtocolResponseOrNotification would prevent the renderer from spoofing root-level events.
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
The browser forwards renderer-originated CDP notifications to the root client without parsing them, so it fails to enforce or append the correct top-level sessionId.
Impact
A compromised renderer could cause the automation client to send commands intended for a sensitive site to the attacker's renderer, potentially allowing interception of passwords or execution of arbitrary JavaScript in the context of the automation script's logic.
What the attacker needed
DevTools client uses flattened CDP mode; Attacker controls a web page; Renderer process is compromised
The fix
The browser should enforce the presence and correctness of the top-level sessionId for all messages from child sessions, for example by injecting or overwriting it in the raw payload using crdtp utilities.
How it was found
- A DevTools automation client connects in flattened mode and attaches to an attacker-controlled page.
- The browser assigns a child sessionId and establishes a Mojo connection to that renderer.
- The attacker compromises the renderer process.
- The compromised renderer crafts a raw Target.attachedToTarget message without a top-level sessionId but with the attacker's sessionId and a sensitive URL in params.
- The renderer sends this message to the browser via the DispatchProtocolNotification Mojo call.
- The browser forwards it to the root client, which treats it as a root-level event and later routes commands for the sensitive URL to the attacker's session.
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.
Chrome DevTools Protocol lets tools like Puppeteer control the browser. In flattened mode, messages from child pages are tagged with a sessionId so the tool knows which page they belong to. The browser was passing messages from a page straight to the tool without checking or adding that tag, so a malicious page could pretend to be the browser itself and redirect the tool's commands.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.