Cross-site request forgery in DevTools (CVE-2026-95362)
DevTools' fallback network loader issues requests as browser-initiated, so an attacker can trigger credentialed GET requests that bypass SameSite=Strict and Fetch Metadata protections. A victim who opens DevTools on a malicious page could have a source-map fetch hit a victim endpoint with cookies.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 months
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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: When DevTools falls back to host bindings to load network resources (like source maps for dedicated workers), it uses DevToolsUIBindings::LoadNetworkResource. This function issues the request using the browser process URL loader factory with an empty request_initiator and a site_for_cookies matching the target URL, causing the network stack to treat it as a trusted, browser-initiated request. This allows an attacker to perform credentialed GET-based CSRF attacks that bypass SameSite=Strict and Fetch Metadata protections.
Affected files:
chrome/browser/devtools/devtools_ui_bindings.cc
Estimated timestamp from git blame: 2019-12-15
Summary
A potential vulnerability in DevToolsUIBindings::LoadNetworkResource allows an attacker to trigger credentialed GET requests that bypass SameSite=Strict cookie restrictions and Fetch Metadata Resource Isolation Policies (Sec-Fetch-Site).
The issue arises because the browser process issues these requests with an empty request_initiator and a site_for_cookies matching the target URL, causing the network stack to treat them as browser-initiated (similar to a user typing a URL directly into the address bar). This behavior can be reliably triggered via source-map loading in dedicated workers.
Technical Details
The function DevToolsUIBindings::LoadNetworkResource in chrome/browser/devtools/devtools_ui_bindings.cc handles network resource loading for the DevTools frontend in cases where target-specific loading via CDP fails or is unavailable. When processing a request, it initializes a network::ResourceRequest with the following configuration:
- Site For Cookies:
resource_request.site_for_cookies = net::SiteForCookies::FromUrl(gurl);. This designates the request as first-party for the target URL. - Initiator: The
request_initiatorfield is left uninitialized, defaulting tostd::nullopt. - Credentials: The
credentials_modedefaults tomojom::CredentialsMode::kInclude. - Dispatch: The request is dispatched through
StoragePartitionImpl::GetURLLoaderFactoryForBrowserProcess().
In the Chromium network stack (//services/network/sec_header_helpers.cc), a request from the browser process with no initiator is assigned a SAME_SITE_STRICT cookie context and a Sec-Fetch-Site: none header. This allows the request to carry SameSite=Strict cookies and bypass security policies that trust the Sec-Fetch-Site: none value, which is intended only for browser-UI-initiated navigation or actions.
Reachability via Dedicated Workers
While DevTools typically loads resources via the inspected target's network factory (which enforces isolation and CSP), dedicated workers currently fall back to this privileged browser-side binding:
- When the DevTools frontend attempts to load a source map for a dedicated worker via the standard
Network.loadNetworkResourceCDP command, it fails with a "Target not supported" error. This is becauseDedicatedWorkerDevToolsAgentHostdoes not provide the required network factory parameters, resulting in an invalid factory being generated in the browser process. - The DevTools frontend (
PageResourceLoader.ts) catches this protocol error. Because it is not a CSP violation, it ignores the error and falls back toloadFromHostBindings. loadFromHostBindingsuses the associated Mojo interfaceblink::mojom::DevToolsFrontendHostto invoke the vulnerableDevToolsUIBindings::LoadNetworkResourcebrowser-process logic.
This path also entirely bypasses the Content Security Policy (CSP) checks that are normally applied to frame-based resource loads in DevTools.
Suggested Exploitation Steps
(Note: These are potential steps based on code analysis; we do not have a working Proof of Concept yet).
- An attacker identifies a target GET action on
https://victim.example/actionprotected bySameSite=Strictcookies orSec-Fetch-Siterestrictions. - The attacker serves a page from
https://attacker.examplethat spawns a dedicated worker:new Worker('w.js');. - The worker script
w.jscontains a source map declaration pointing to the victim endpoint://# sourceMappingURL=https://victim.example/action. - A victim, logged into
https://victim.example, visitshttps://attacker.example. - The victim opens DevTools (e.g., F12).
- The DevTools frontend automatically attempts to fetch the source map for
w.js. - The network request to
https://victim.example/actionis issued by the browser process. It carriesSameSite=Strictcookies and theSec-Fetch-Site: noneheader, successfully bypassing cross-site protections and triggering the CSRF.
Suggested Fix
DevToolsUIBindings::LoadNetworkResource should not construct ResourceRequest objects that mimic browser-initiated navigation.
- Provide an Initiator: Set
request_initiatorto the origin of the page being inspected, or a specific DevTools origin, rather than leaving it asstd::nullopt. - Correct SiteForCookies: Do not blindly use
net::SiteForCookies::FromUrl(gurl). Thesite_for_cookiesshould reflect the context of the inspected page, not the requested resource URL. - Credentials: Re-evaluate if
mojom::CredentialsMode::kIncludeis appropriate for host-binding fallbacks, or if it should default tokOmitorkSameOrigin.
Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955
Results 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 DevTools host-binding loader builds a browser-process request with no initiator and a site-for-cookies matching the target URL, so the network stack treats it as a trusted browser-initiated request.
Impact
An attacker could perform credentialed GET-based CSRF against a victim endpoint, bypassing SameSite=Strict and Fetch Metadata, but the victim must open DevTools and the report has no working proof of concept.
What the attacker needed
Victim logged into the target site; victim visits attacker page; victim opens DevTools; target has a GET action with side effects
The fix
The loader should set a proper request initiator and site-for-cookies reflecting the inspected page, and reconsider including credentials for host-binding fallbacks.
How it was found
- The attacker identifies a target GET action protected by SameSite=Strict cookies or Sec-Fetch-Site restrictions.
- The attacker serves a page that spawns a dedicated worker.
- The worker script declares a source map pointing to the victim endpoint.
- A logged-in victim visits the attacker page and opens DevTools.
- DevTools tries to fetch the source map and the browser process issues the request with cookies and Sec-Fetch-Site: none.
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 website asks your browser to fetch something, the browser usually attaches a label saying where the request came from. Some protections, like SameSite cookies, rely on that label to stop other sites from making requests with your logged-in cookies. Here, a part of the browser's developer tools made requests that looked like they came from the browser itself, so those protections did not apply.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.