Insufficient validation of untrusted input in DevTools (CVE-2026-7965)
A compromised renderer can steal a DevTools frame token from a cross-origin popup and reuse it when creating a fenced frame, because token uniqueness is only checked within the current tab. This silently overwrites the global DevTools target map, letting the attacker hijack DevTools automation sessions and intercept CDP commands intended for the victim page.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 39 days
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A compromised renderer can hijack DevTools sessions for cross-origin pages by supplying a stolen devtools_frame_token during fenced frame creation. The browser improperly scopes token uniqueness validation to the current tab and silently overwrites the process-global DevTools target map on collision, allowing an attacker to intercept Chrome DevTools Protocol (CDP) commands.
Affected files:
content/browser/devtools/devtools_agent_host_impl.cccontent/browser/devtools/render_frame_devtools_agent_host.cccontent/browser/renderer_host/render_frame_host_impl.cccontent/browser/renderer_host/render_frame_proxy_host.cc
Estimated timestamp from git blame: 2026-01-06
Overview
A logic error exists in DevToolsAgentHostImpl where process-global DevTools target IDs can be overwritten due to insufficient validation during Fenced Frame creation. A compromised renderer can exploit this to hijack DevTools automation sessions (e.g., Puppeteer) connecting to cross-origin targets, leading to cross-origin data theft.
Vulnerability Details
The issue stems from a combination of three factors:
-
Cross-WebContents Token Leak: When a renderer opens a cross-origin popup, the browser sends a
PageBroadcast.CreateRemoteMainFrameMojo IPC to the opener renderer so it can build a remote frame proxy. This IPC leaks the victim frame'sdevtools_frame_tokento the potentially compromised opener renderer. -
Insufficient Validation Scope: When a renderer creates a Fenced Frame, it supplies a
devtools_frame_tokenvia theLocalFrameHost.CreateFencedFrameMojo IPC.RenderFrameHostImpl::CreateFencedFrameattempts to ensure this token is unique to prevent collisions. However, it only checks nodes within the current tab'sFrameTree(GetOutermostMainFrame()->frame_tree()->NodesIncludingInnerTreeNodes()). It fails to check for collisions across differentWebContents. -
Silent Map Overwrite: When the DevTools agent host is created for the new fenced frame,
DevToolsAgentHostImpl::NotifyCreatedregisters it in a process-global map:C++ void DevToolsAgentHostImpl::NotifyCreated() { DCHECK(!GetDevtoolsInstances().contains(id_)); GetDevtoolsInstances()[id_] = this; // ... }Because
DCHECKis compiled out in Release builds, the global map entry for the victim's token is silently overwritten with a pointer to the attacker's new fenced frame agent host.
Potential Attack Steps
Note: These are theoretical steps as our tooling does not yet have the ability to run code to produce a working proof-of-concept.
- An attacker gains code execution in a renderer process (e.g., via a V8 bug).
- The compromised renderer opens a cross-origin window to a sensitive site (e.g.,
window.open('https://victim.com')). - The browser sends a
CreateRemoteMainFrameIPC to the attacker's renderer. The attacker intercepts this IPC and extracts the victim'sdevtools_frame_token. - The compromised renderer crafts a
LocalFrameHost.CreateFencedFrameMojo IPC to create a fenced frame in its own document, passing the stolen victim'sdevtools_frame_tokeninstead of a randomly generated one. - The browser's validation passes because the victim is in a different
WebContents. - The browser creates a
RenderFrameDevToolsAgentHostfor the attacker's fenced frame, which silently overwrites the victim's entry in the globalGetDevtoolsInstances()map. - An automated DevTools client (like Puppeteer or a Chrome Extension) attempts to attach to the victim's target ID.
DevToolsAgentHostImpl::GetForIdreturns the attacker's fenced frame. The DevTools client unknowingly sends CDP commands (e.g.,Runtime.evaluateto inject scripts orInput.dispatchKeyEventto type passwords) into the attacker's frame, allowing the attacker to steal credentials or hijack the session.
Suggested Fix
- Harden Map Insertion: In
DevToolsAgentHostImpl::NotifyCreated(), upgrade theDCHECKto aCHECK, or safely handle the collision without overwriting existing valid instances. - Enforce Global Uniqueness: Update the validation in
RenderFrameHostImpl::CreateFencedFrameto check the globalDevToolsAgentHost::GetForId()(or a truly global registry) to ensure the token doesn't collide with any existing target across allWebContents. - Browser-Side Token Generation: Consider having the browser unconditionally generate the
devtools_frame_tokenfor Fenced Frames rather than trusting the token provided by the renderer via IPC.
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 token uniqueness check in RenderFrameHostImpl::CreateFencedFrame only inspects the current tab's frame tree, and the global DevTools target map silently overwrites entries on collision because the DCHECK is compiled out in release builds.
Impact
An attacker could hijack DevTools automation sessions and intercept CDP commands, potentially stealing credentials or session data from cross-origin pages.
What the attacker needed
Compromised renderer process; ability to intercept Mojo IPC; victim uses DevTools automation
The fix
The fix should enforce global uniqueness of the token across all WebContents, harden the map insertion to avoid silent overwrites, and consider having the browser generate the token instead of trusting the renderer.
How it was found
- An attacker gains code execution in a renderer process.
- The compromised renderer opens a cross-origin window to a sensitive site.
- The attacker intercepts the CreateRemoteMainFrame IPC and extracts the victim's devtools_frame_token.
- The compromised renderer crafts a CreateFencedFrame IPC with the stolen token.
- The browser's validation passes because the victim is in a different WebContents.
- The browser creates a DevTools agent host for the attacker's fenced frame, overwriting the victim's entry in the global map.
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 opens another site in a new window, the browser shares a special identifier (a token) with the first page so it can set up a connection. The bug is that this token is not checked for uniqueness across all open tabs, only within the current one. A malicious page that already has control of the browser's rendering process can steal that token and use it to trick developer tools into talking to the wrong page, potentially stealing data.
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.