Skip to content
CORS Advisory Advanced CVE-2026-121108

Confused deputy in BackgroundFetch (CVE-2026-121108)

A logic bug in Incognito BackgroundFetch causes requests to drop the request initiator, credentials mode, and isolation info, leading the network service to misidentify cross-origin requests as first-party navigations. This can bypass CORS and Fetch Metadata CSRF defences, potentially allowing an attacker to read cross-origin authenticated data.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 7 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 security team.

Overview: A logic bug in Incognito BackgroundFetch causes requests to drop the request initiator, credentials mode, and isolation info. This causes the network service to misidentify cross-origin requests, incorrectly attaching Sec-Fetch-Site: none and first-party cookies. Due to a disconnect between the network request and the CORS filter, this can potentially lead to a full CORS bypass and leakage of cross-origin authenticated data.

Affected files:

  • components/download/internal/background_service/in_memory_download.cc

Estimated timestamp from git blame: 2021-09-28

Summary

A potential vulnerability exists in InMemoryDownloadImpl::SendRequest(), which handles BackgroundFetch requests in incognito mode. When constructing the network request, it drops critical security fields, including request_initiator, credentials_mode, and isolation_info.

Because these requests are sent via a trusted browser-process URLLoaderFactory, the missing initiator causes the network service to incorrectly identify the request as a direct browser-initiated navigation, resulting in a Sec-Fetch-Site: none header for cross-origin requests. Furthermore, the dropped credentials_mode defaults to kInclude, and the missing isolation_info causes the network service to auto-assign a first-party partition. This combination bypasses Fetch Metadata CSRF defenses and can lead to the exfiltration of cross-origin authenticated data.

Technical Analysis

In incognito profiles, BackgroundFetch avoids writing to disk by using the InMemoryDownloadImpl class. When initiating a network request, InMemoryDownloadImpl::SendRequest() (components/download/internal/background_service/in_memory_download.cc) manually constructs a network::ResourceRequest but neglects to copy several security-sensitive fields from the provided RequestParams:

C++
void InMemoryDownloadImpl::SendRequest() {
  auto request = std::make_unique<network::ResourceRequest>();
  request->url = request_params_.url;
  request->method = request_params_.method;
  request->headers = request_params_.request_headers;
  // request->request_initiator remains std::nullopt
  // request->credentials_mode remains kInclude (default)
  // request->trusted_params->isolation_info is not fully populated
  // request->mode defaults to kNoCors
  // ...

This data loss leads to a cascade of security failures in the network service:

  1. Isolation Auto-Assignment: Because request.trusted_params lacks an isolation_info, and the browser-process factory has automatically_assign_isolation_info = true, the network service auto-generates a first-party IsolationInfo based strictly on the target URL. This places the request in the victim's first-party partition.
  2. Validation Bypass: CorsURLLoaderFactory::IsValidRequest allows the missing request_initiator because the request mode defaulted to kNoCors and the process_id represents the trusted browser process.
  3. Sec-Fetch-Site Spoofing: GetInitiatorRelation() sees no initiator and assumes the request is a direct, user-initiated browser action. It returns std::nullopt, resulting in Sec-Fetch-Site: none being attached to the request, completely bypassing server-side CSRF protections that expect cross-site.
  4. CORS Filter Disconnect: The request is sent with the user's cookies (due to the kInclude default). If the server responds with Access-Control-Allow-Origin: * (common for endpoints not expecting credentials), the browser's BackgroundFetchCrossOriginFilter::CanPopulateBody() evaluates the response. This filter incorrectly relies on the original JS request parameters (credentials: 'omit'). It evaluates include_credentials_ as false, and permits the cross-origin read, entirely unaware that cookies were actually included in the outgoing request.

Potential Reproduction Steps

Please note: These are theoretical steps, as our tooling agent cannot execute a working proof of concept.

  1. Launch Chrome in Incognito mode and navigate to an attacker-controlled site (e.g., https://attacker.example).
  2. The attacker's site registers a Service Worker and executes backgroundFetch.fetch('https://victim.example/sensitive', { credentials: 'omit' }).
  3. The flawed InMemoryDownloadImpl constructs the request, dropping the initiator and credentials mode.
  4. The network service attaches Sec-Fetch-Site: none and the user's victim.example cookies to the outgoing request.
  5. The victim.example server, seeing Sec-Fetch-Site: none and valid cookies, assumes a legitimate navigation and returns sensitive data with Access-Control-Allow-Origin: *.
  6. BackgroundFetchCrossOriginFilter evaluates the original credentials: omit parameter, sees Access-Control-Allow-Origin: *, and allows the response body to be read.
  7. The attacker's Service Worker reads the response body, successfully exfiltrating the victim's cross-origin authenticated data.

Suggested Fix

Modify InMemoryDownloadImpl::SendRequest() to either use the CreateResourceRequest() helper (like other download paths) or explicitly copy the missing security fields from request_params_. Specifically, ensure request_initiator, credentials_mode, trusted_params->isolation_info, and the correct mode (kNavigate) are populated on the network::ResourceRequest.

Evaluated with Chrome root at commit: f200f57a19490707ff8bc7aa5de3cbc443a3afad


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 InMemoryDownloadImpl::SendRequest() method manually constructs a network request but fails to copy security-sensitive fields (request_initiator, credentials_mode, isolation_info) from the original request parameters.

Impact

This could lead to a full CORS bypass and leakage of cross-origin authenticated data, though the report notes the reproduction steps are theoretical and not executed.

What the attacker needed

Incognito mode; Attacker-controlled site; Victim visits attacker site; Service Worker support

The fix

Modify InMemoryDownloadImpl::SendRequest() to use the CreateResourceRequest() helper or explicitly copy the missing security fields from request_params_.

How it was found

  1. Launch Chrome in Incognito mode and navigate to an attacker-controlled site.
  2. The attacker's site registers a Service Worker and executes a background fetch to a victim endpoint with credentials omitted.
  3. The flawed InMemoryDownloadImpl constructs the request, dropping the initiator and credentials mode.
  4. The network service attaches Sec-Fetch-Site: none and the user's cookies to the outgoing request.
  5. The victim server returns sensitive data with Access-Control-Allow-Origin: *.
  6. BackgroundFetchCrossOriginFilter evaluates the original credentials: omit parameter and allows the response body to be read, exfiltrating data.

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 makes a request to another site, the browser normally includes information about where the request came from and whether cookies should be sent. In this bug, a background download feature in Incognito mode forgot to include that information, so the browser treated the request as if the user had typed the address directly, sending cookies and hiding that it was cross-site. This could let a malicious site trick the browser into fetching and reading private data from another site.

What is CORS?

A permissive cross-origin policy lets another site read responses with the user's credentials.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

CORS misconfiguration

The lesson behind this report.

A permissive cross-origin policy lets another site read responses with the user's credentials.