Skip to content
CSRF Advisory Advanced CVE-2026-95362

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:

  1. Site For Cookies: resource_request.site_for_cookies = net::SiteForCookies::FromUrl(gurl);. This designates the request as first-party for the target URL.
  2. Initiator: The request_initiator field is left uninitialized, defaulting to std::nullopt.
  3. Credentials: The credentials_mode defaults to mojom::CredentialsMode::kInclude.
  4. 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:

  1. When the DevTools frontend attempts to load a source map for a dedicated worker via the standard Network.loadNetworkResource CDP command, it fails with a "Target not supported" error. This is because DedicatedWorkerDevToolsAgentHost does not provide the required network factory parameters, resulting in an invalid factory being generated in the browser process.
  2. The DevTools frontend (PageResourceLoader.ts) catches this protocol error. Because it is not a CSP violation, it ignores the error and falls back to loadFromHostBindings.
  3. loadFromHostBindings uses the associated Mojo interface blink::mojom::DevToolsFrontendHost to invoke the vulnerable DevToolsUIBindings::LoadNetworkResource browser-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).

  1. An attacker identifies a target GET action on https://victim.example/action protected by SameSite=Strict cookies or Sec-Fetch-Site restrictions.
  2. The attacker serves a page from https://attacker.example that spawns a dedicated worker: new Worker('w.js');.
  3. The worker script w.js contains a source map declaration pointing to the victim endpoint: //# sourceMappingURL=https://victim.example/action.
  4. A victim, logged into https://victim.example, visits https://attacker.example.
  5. The victim opens DevTools (e.g., F12).
  6. The DevTools frontend automatically attempts to fetch the source map for w.js.
  7. The network request to https://victim.example/action is issued by the browser process. It carries SameSite=Strict cookies and the Sec-Fetch-Site: none header, successfully bypassing cross-site protections and triggering the CSRF.

Suggested Fix

DevToolsUIBindings::LoadNetworkResource should not construct ResourceRequest objects that mimic browser-initiated navigation.

  1. Provide an Initiator: Set request_initiator to the origin of the page being inspected, or a specific DevTools origin, rather than leaving it as std::nullopt.
  2. Correct SiteForCookies: Do not blindly use net::SiteForCookies::FromUrl(gurl). The site_for_cookies should reflect the context of the inspected page, not the requested resource URL.
  3. Credentials: Re-evaluate if mojom::CredentialsMode::kInclude is appropriate for host-binding fallbacks, or if it should default to kOmit or kSameOrigin.

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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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

  1. The attacker identifies a target GET action protected by SameSite=Strict cookies or Sec-Fetch-Site restrictions.
  2. The attacker serves a page that spawns a dedicated worker.
  3. The worker script declares a source map pointing to the victim endpoint.
  4. A logged-in victim visits the attacker page and opens DevTools.
  5. 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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.