Insufficient policy enforcement in Prefetch (CVE-2026-17662)
Chrome's prefetch code always looked up the ServiceWorker and network contexts of the default StoragePartition, and the prefetch matching key did not record which partition a prefetch came from. An attacker controlling a guest context in an isolated partition could therefore have its navigation inherit the default profile's ServiceWorker and read cross-origin authenticated data.
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.
Overview: A logic flaw in Chrome's prefetching system allows a navigation in a non-default StoragePartition (e.g., a guest <webview>) to inherit a ServiceWorker controller from the default StoragePartition. This occurs because the prefetch path hardcodes the default StoragePartition for ServiceWorker checks and network fetching, and the subsequent matching logic fails to verify the StoragePartition identity before inheriting the controller. This allows an attacker in an isolated context to read cross-origin data intended for the user's primary profile.
Affected files:
content/browser/service_worker/service_worker_main_resource_handle.cccontent/browser/preloading/prefetch/prefetch_streaming_url_loader.cccontent/browser/preloading/prefetch/prefetch_service.cccontent/browser/preloading/prefetch/prefetch_url_loader_interceptor.cccontent/browser/service_worker/service_worker_client.cccontent/browser/preloading/prefetch/prefetch_key.h
Estimated timestamp from git blame: 2026-02-13
Description
There is a potential StoragePartition isolation bypass in Chrome's prefetching logic when handling Service Workers. PrefetchService manages prefetches at the BrowserContext level. However, when evaluating if a ServiceWorker controls a prefetch URL, it explicitly fetches the ServiceWorkerContext and NetworkContext from the default StoragePartition, regardless of the initiator's partition (e.g., a guest <webview> or Controlled Frame).
See content/browser/preloading/prefetch/prefetch_service.cc lines 850-853:
ServiceWorkerContextWrapper* service_worker_context =
g_service_worker_context_for_testing
? g_service_worker_context_for_testing
: browser_context_->GetDefaultStoragePartition()
->GetServiceWorkerContext();
Later, when the guest context navigates to the prefetched URL, PrefetchURLLoaderInterceptor attempts to find a matching prefetch. The matching logic relies on PrefetchKey, which only encapsulates the target URL and the initiator's DocumentToken, completely lacking any field representing the StoragePartition.
Upon a successful match, ServiceWorkerMainResourceHandle::InitializeForRequest is called to wire the guest navigation to the prefetch's ServiceWorker. This method validates the prefetch client by comparing its top_frame_origin and blink::StorageKey against the navigation context. However, neither url::Origin nor blink::StorageKey encodes StoragePartition identity. Consequently, the check passes, and the navigation incorrectly inherits the default partition's ServiceWorkerRegistration.
Potential Steps to Reproduce
Note: These are suggested steps; our tooling agent cannot execute code to provide a working PoC.
- A user visits
https://victim.testin a standard browser tab, registering a Service Worker in the defaultStoragePartition. - The user runs a malicious Chrome App or Isolated Web App containing a guest context (e.g.,
<webview>), which operates in a separate, isolatedStoragePartition. - From within the attacker-controlled guest context, a Speculation Rules prefetch (
<script type="speculationrules">) is triggered forhttps://victim.test. - The prefetch executes using the default
StoragePartition's network context and ServiceWorker context. - The attacker then navigates the guest context to
https://victim.test. - The prefetch interceptor incorrectly matches the prefetch and adopts the default-partition ServiceWorker as the controller for the guest navigation.
- Subsequent subresource fetches from the guest document at
https://victim.testare routed through the default partition's ServiceWorker, allowing the attacker to read authenticated or cached cross-origin data.
Impact
This vulnerability allows an attacker to completely bypass StoragePartition isolation boundaries. By controlling a guest context, the attacker can force it to be controlled by a Service Worker from the user's primary, default profile. This enables the extraction of sensitive, authenticated data from arbitrary origins that the user has visited, leading to a severe cross-partition data leak.
Suggested Fix
- Enforce Partition Matching:
PrefetchKeyshould be updated to include theStoragePartition(or an identifier for it) so that prefetches initiated in an isolated partition cannot match navigations in the default partition, and vice versa. - Use Correct Contexts:
PrefetchServiceandPrefetchStreamingURLLoadermust use theServiceWorkerContextandNetworkContextassociated with the initiator'sStoragePartition, rather than unconditionally callingBrowserContext::GetDefaultStoragePartition(). - Strict Inheritance Checks:
ServiceWorkerMainResourceHandle::InitializeForRequestshould explicitly verify that theStoragePartitionof theclient_for_prefetchmatches theStoragePartitionof the ongoing navigation before callingSetControllerRegistration.
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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 prefetch code unconditionally used the default StoragePartition's ServiceWorker and network contexts, and PrefetchKey lacked any partition identifier, so the later controller-inheritance check could not tell partitions apart.
Impact
An attacker controlling a guest context could bypass StoragePartition isolation and extract sensitive authenticated data from origins the user has visited; the report notes the steps are suggested and no working proof of concept was executed.
What the attacker needed
User has visited the target site; attacker-controlled Chrome App or IWA; guest context in an isolated partition; no working PoC demonstrated
The fix
PrefetchKey should include the StoragePartition, the prefetch code should use the initiator's own ServiceWorker and network contexts, and the inheritance check should verify partition identity before setting the controller.
How it was found
- The user visits a site in a normal tab, which registers a Service Worker in the default StoragePartition.
- The user runs a malicious Chrome App or Isolated Web App with a guest context in a separate StoragePartition.
- The guest context triggers a Speculation Rules prefetch for the same site.
- The prefetch runs using the default partition's network and ServiceWorker contexts.
- The attacker navigates the guest context to that site.
- The prefetch is matched and the guest navigation adopts the default partition's ServiceWorker, so later subresource fetches go through it.
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.
Chrome keeps separate profiles apart using something called a StoragePartition, so a guest app should not see the main profile's data. Here the prefetch feature checked the wrong partition and then matched the prefetch without checking which partition it belonged to. That let a guest page be handled by the main profile's background worker, which can hold logged-in data.
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.