Inappropriate implementation in DevTools (CVE-2026-11250)
A logic error in DevTools detachment leaves a stale raw headers grant in the Network Service, allowing a compromised renderer to read HttpOnly Set-Cookie headers via a WebSocket handshake. The attacker must first compromise the renderer and have DevTools opened and closed for that tab.
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 logic error in RenderFrameDevToolsAgentHost::UpdateRawHeadersAccess causes a stale raw headers grant to persist in the Network Service after DevTools is closed. A compromised renderer can exploit this stale grant by initiating a WebSocket connection, allowing it to read HttpOnly Set-Cookie headers. This bypasses the Network Service cookie isolation boundary.
Affected files:
content/browser/devtools/render_frame_devtools_agent_host.ccservices/network/websocket.ccservices/network/network_service.cccontent/browser/devtools/devtools_agent_host_impl.cc
Estimated timestamp from git blame: 2021-02-04
Summary
There is a potential defense-in-depth bypass where a compromised renderer process can leak HttpOnly cookies. This occurs due to a logic flaw in the DevTools detachment path, which fails to revoke raw header access for the renderer process in the Network Service. The compromised renderer can then use this stale permission to initiate a WebSocket connection and read Set-Cookie headers from the handshake response, which are normally stripped by the Network Service.
Technical Details
-
The Logic Flaw: In
content/browser/devtools/render_frame_devtools_agent_host.cc, the methodUpdateRawHeadersAccessupdates the list of origins with raw header access. It iterates over all activeDevToolsAgentHostinstances and uses the following condition to skip inactive ones:C++ // Do not skip the nodes if they're about to get attached. if (!entry.second->IsAttached() && entry.first != rfh->frame_tree_node()) { continue; }During the detach path,
DevToolsAgentHostImpl::DetachInternalremoves the session from its internal list before calling the virtualDetachSessionmethod. Thus, whenUpdateRawHeadersAccessruns for the detaching host:entry.second->IsAttached()evaluates tofalse.entry.first != rfh->frame_tree_node()evaluates tofalse(because it's the same frame).- The combined condition is
false, meaning the detaching host is not skipped. - Its origin is incorrectly added to the
process_originsset and sent to the Network Service.
-
Persistence in Network Service:
NetworkService::SetRawHeadersAccessreceives the Mojo call. Because the origin list is not empty, it updatesraw_headers_access_origins_by_pid_with the stale origin instead of erasing the entry. -
WebSocket Leak: When a WebSocket connection is created,
WebSocketFactory::CreateWebSocketchecksHasRawHeadersAccess. Because of the stale grant, this returnstrue, and theWebSocketis instantiated with thehas_raw_headers_access_flag set totrue. During the handshake response processing inservices/network/websocket.cc, the functionToMojochecks this flag:C++ if (has_raw_headers_access || !net::HttpResponseHeaders::IsCookieResponseHeader(name)) { // ... include header }The
HttpOnlySet-Cookieheader bypasses the filter and is sent directly to the renderer process via themojom::WebSocketHandshakeClientinterface.
Potential Attack Steps
Note: These are suggested steps; our tooling agent does not currently have the ability to run a live proof of concept.
- An attacker compromises a renderer process (e.g., via a v8 vulnerability) and gains arbitrary code execution within the sandbox.
- The user opens and subsequently closes Chrome DevTools for a tab hosted in the compromised renderer.
- Upon DevTools closure, the logic bug leaves a stale raw headers grant in the Network Service.
- The compromised renderer manually constructs a Mojo call to
blink::mojom::WebSocketConnector::Connectfor the affected origin, passing a maliciousWebSocketHandshakeClient. - The Network Service establishes the WebSocket connection and sends the handshake response back to the attacker's client.
- The attacker parses the
mojom::WebSocketHandshakeResponsePtrto extract theHttpOnlySet-Cookieheaders.
Suggested Fix
Refactor the skip condition in RenderFrameDevToolsAgentHost::UpdateRawHeadersAccess to correctly handle the detachment phase. Specifically, it must differentiate between a host that is about to attach (where sessions_ might be empty but attachment is pending) and a host that has just detached (where sessions_ is empty and access should be revoked). Alternatively, check the DevToolsAgentHost instances directly against the one currently being detached.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
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 detach path removes the session before the access update runs, so the condition that should skip detached hosts does not skip the host being detached, leaving its origin in the raw headers access list.
Impact
A compromised renderer could read HttpOnly Set-Cookie headers, bypassing the Network Service cookie isolation boundary, but only after DevTools has been opened and closed for that tab.
What the attacker needed
Compromised renderer process; DevTools opened and closed for the tab; ability to send Mojo calls
The fix
The skip condition in UpdateRawHeadersAccess should be refactored to distinguish a host that is about to attach from one that has just detached, so access is revoked on detach.
How it was found
- Compromise a renderer process to gain code execution inside the sandbox.
- Open and then close Chrome DevTools for a tab in that renderer.
- The logic bug leaves a stale raw headers grant in the Network Service.
- The compromised renderer constructs a Mojo call to connect a WebSocket for the affected origin.
- The Network Service returns the handshake response to the attacker's client.
- The attacker extracts HttpOnly Set-Cookie headers from the response.
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 open developer tools in a browser, the browser temporarily lets that page see some extra information, like cookies marked HttpOnly that scripts normally cannot read. This report says that after you close the tools, that extra permission is not properly removed, so a page that has already been hacked could still use it to steal those protected cookies. The attacker first needs to find a way to run their own code inside the browser tab.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.