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:
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:
- Isolation Auto-Assignment: Because
request.trusted_paramslacks anisolation_info, and the browser-process factory hasautomatically_assign_isolation_info = true, the network service auto-generates a first-partyIsolationInfobased strictly on the target URL. This places the request in the victim's first-party partition. - Validation Bypass:
CorsURLLoaderFactory::IsValidRequestallows the missingrequest_initiatorbecause the request mode defaulted tokNoCorsand theprocess_idrepresents the trusted browser process. - Sec-Fetch-Site Spoofing:
GetInitiatorRelation()sees no initiator and assumes the request is a direct, user-initiated browser action. It returnsstd::nullopt, resulting inSec-Fetch-Site: nonebeing attached to the request, completely bypassing server-side CSRF protections that expectcross-site. - CORS Filter Disconnect: The request is sent with the user's cookies (due to the
kIncludedefault). If the server responds withAccess-Control-Allow-Origin: *(common for endpoints not expecting credentials), the browser'sBackgroundFetchCrossOriginFilter::CanPopulateBody()evaluates the response. This filter incorrectly relies on the original JS request parameters (credentials: 'omit'). It evaluatesinclude_credentials_asfalse, 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.
- Launch Chrome in Incognito mode and navigate to an attacker-controlled site (e.g.,
https://attacker.example). - The attacker's site registers a Service Worker and executes
backgroundFetch.fetch('https://victim.example/sensitive', { credentials: 'omit' }). - The flawed
InMemoryDownloadImplconstructs the request, dropping the initiator and credentials mode. - The network service attaches
Sec-Fetch-Site: noneand the user'svictim.examplecookies to the outgoing request. - The
victim.exampleserver, seeingSec-Fetch-Site: noneand valid cookies, assumes a legitimate navigation and returns sensitive data withAccess-Control-Allow-Origin: *. BackgroundFetchCrossOriginFilterevaluates the originalcredentials: omitparameter, seesAccess-Control-Allow-Origin: *, and allows the response body to be read.- 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.
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
- Launch Chrome in Incognito mode and navigate to an attacker-controlled site.
- The attacker's site registers a Service Worker and executes a background fetch to a victim endpoint with credentials omitted.
- The flawed InMemoryDownloadImpl constructs the request, dropping the initiator and credentials mode.
- The network service attaches Sec-Fetch-Site: none and the user's cookies to the outgoing request.
- The victim server returns sensitive data with Access-Control-Allow-Origin: *.
- 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.