Confused deputy in BackgroundFetch (CVE-2026-87453)
A compromised renderer can initiate Background Fetch requests for file:// URLs because the browser process fails to validate the URL scheme and loses the renderer's process ID during handoff to the download subsystem. This allows the browser to act as a confused deputy, potentially leaking NTLM credentials via UNC paths on Windows or acting as a local file existence oracle.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 6 months
Flapjack (go/flapjack), an LLM-powered static analysis tool, has identified the following potential security issue.
Overview: A compromised renderer can initiate Background Fetch requests for file:// URLs due to missing scheme validation in the browser process. These requests bypass download security checks because the requesting process ID is lost during component handoff, allowing the browser to act as a confused deputy. This can potentially be abused to leak NTLM credentials via UNC paths on Windows or act as a cross-platform local file existence oracle.
Affected files:
content/browser/background_fetch/background_fetch_service_impl.cccontent/browser/background_fetch/background_fetch_context.cccontent/browser/background_fetch/background_fetch_data_manager.cccomponents/download/content/internal/download_driver_impl.cccontent/browser/download/download_manager_impl.cc
Estimated timestamp from git blame: 2021-08-03
Summary
A compromised renderer process can bypass Blink-side restrictions and directly send a Mojo message to the browser process to initiate a Background Fetch for file:// URLs. Due to missing scheme validation in BackgroundFetchServiceImpl::ValidateRequests and a loss of the renderer's process ID during the handoff to the Download subsystem, the browser process skips standard security checks (DownloadRequestUtils::IsURLSafe). This allows the browser to act as a confused deputy and fetch local files or UNC paths.
While the contents of the local files are not directly exposed to the Service Worker due to CORS filtering (BackgroundFetchCrossOriginFilter), the attacker can distinguish between a file existing (CORS error) and not existing (network error). Furthermore, on Windows, fetching a UNC path will cause the browser process to automatically attempt SMB authentication, leaking the user's NTLM credentials.
Technical Details
-
Missing Scheme Validation: When a renderer initiates a fetch via Mojo,
BackgroundFetchServiceImpl::FetchcallsValidateRequests(content/browser/background_fetch/background_fetch_service_impl.cc). This function currently only checks if therequestsvector is empty. It fails to validate that the URLs use a safe scheme (e.g., HTTP/HTTPS). -
Loss of Process Attribution: The request is passed through
BackgroundFetchDelegateBaseto theBackgroundDownloadService. When the download is ready,DownloadDriverImpl::Start(components/download/content/internal/download_driver_impl.cc) instantiatesDownloadUrlParametersusing a constructor that defaultsrender_process_host_idandrender_frame_host_routing_idto-1. -
Security Check Bypass: In
DownloadManagerImpl::BeginDownloadInternal(content/browser/download/download_manager_impl.cc), the system attempts to verify if the renderer is allowed to access the URL:C++ if (params->render_process_host_id() >= 0 && !DownloadRequestUtils::IsURLSafe(params->render_process_host_id(), params->url())) { ... }Because the ID was defaulted to
-1, this check is completely bypassed. -
Privileged File Fetching: The download proceeds to
BeginResourceDownloadOnChecksComplete, which sees thefile://scheme and creates aFileURLLoaderFactorywith the full permissions of the browser context. -
CORS Bypass at the Loader Level: The download subsystem (
InProgressDownloadManager) hardcodes the network request mode tonetwork::mojom::RequestMode::kNavigate. Because of this,CalculateResponseTypeinservices/network/public/cpp/cors/cors.ccreturnskBasic. This preventsFileURLLoaderFactory::CreateLoaderAndStartInternalfrom rejecting the cross-originfile://request upfront. -
The Oracle/Leak:
- NTLM Leak: If a Windows UNC path is provided (
file:////attacker.com/share/test),net::FileURLToFilePathparses it as\\attacker.com\share\test, and the OS attempts NTLM authentication with the remote server. - Existence Oracle: The
FileURLLoaderattempts to read the file. If it succeeds, the fetch completes, butBackgroundFetchCrossOriginFilter::CanPopulateBody()blocks the response body from the Service Worker cache due to missing CORS headers, resulting in aFETCH_ERRORstate. If the file does not exist, the loader fails immediately withERR_FILE_NOT_FOUND, resulting in aBAD_STATUSstate. The attacker can observe these differing states via the Service Worker Background Fetch events.
- NTLM Leak: If a Windows UNC path is provided (
Potential Attacker Steps (Suggested)
Note: These are potential steps to trigger the vulnerability, as Flapjack LLM agents do not yet have the ability to run code to provide a working PoC.
- Gain arbitrary code execution in a sandboxed renderer process (e.g., via a V8 or Blink memory corruption bug).
- Establish a direct Mojo connection to
blink::mojom::BackgroundFetchService. - Craft a
FetchAPIRequestPtrcontaining a targetfile://URL (e.g., a local file to probe for existence, or a remote UNC path to steal NTLM hashes). - Call
BackgroundFetchService::Fetchwith the crafted request. - Register a Service Worker to listen for
backgroundfetchsuccessandbackgroundfetchfailevents. - Observe the error reason in the event to oracle file existence or capture the NTLM hash on a controlled remote SMB server.
Suggested Fix
- In
BackgroundFetchServiceImpl::ValidateRequests, add strict validation to ensure all requested URLs use safe schemes (e.g.,url.SchemeIsHTTPOrHTTPS()). - Plumb the
render_process_host_idandrender_frame_host_routing_idthrough theBackgroundDownloadServicestack so thatDownloadDriverImpl::Startcan populateDownloadUrlParametersaccurately, ensuringDownloadRequestUtils::IsURLSafeis correctly evaluated for all downloads.
Evaluated with Chrome root at commit: 9760e6c70cd33a320713361f17c6dcca85648c0f
Results from Flapjack so far have been promising, but it can be wrong in its deductions. At this time, it does not produce proof of concepts or fuzzer tests. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve Flapjack’s 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 missing scheme validation in BackgroundFetchServiceImpl::ValidateRequests and loss of the renderer's process ID during handoff to the download subsystem, causing security checks to be skipped.
Impact
This could allow an attacker to leak NTLM credentials via UNC paths on Windows or act as a cross-platform local file existence oracle, though file contents are not directly exposed due to CORS filtering.
What the attacker needed
Compromised renderer process; ability to send Mojo messages; Service Worker registration
The fix
It should be fixed by adding strict scheme validation in BackgroundFetchServiceImpl::ValidateRequests and plumbing the renderer process ID through the download stack so that DownloadRequestUtils::IsURLSafe is correctly evaluated.
How it was found
- Gain arbitrary code execution in a sandboxed renderer process.
- Establish a direct Mojo connection to blink::mojom::BackgroundFetchService.
- Craft a FetchAPIRequestPtr containing a target file:// URL.
- Call BackgroundFetchService::Fetch with the crafted request.
- Register a Service Worker to listen for backgroundfetchsuccess and backgroundfetchfail events.
- Observe the error reason in the event to oracle file existence or capture the NTLM hash on a controlled remote SMB server.
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.
A web browser has multiple parts: a renderer that runs web pages and a browser process that has more privileges. Normally, the renderer cannot ask the browser to read local files. Here, a bug lets a compromised renderer trick the browser into fetching local files or network paths, which could leak login credentials or reveal whether files exist.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.