Skip to content
Access control Advisory Advanced CVE-2026-87471

Incorrect authorization in ServiceWorker (CVE-2026-87471)

A CSP sandbox header on a navigation response correctly isolates the frame into a sandboxed process but fails to revoke pre-created ServiceWorker Mojo capabilities. A compromised sandboxed renderer can abuse these leaked capabilities to interact with the parent origin's ServiceWorker and CacheStorage, allowing reading cross-origin data and bypassing Site Isolation.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 5 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: When a navigation response contains a CSP sandbox header, the browser correctly isolates the frame into a sandboxed process but fails to revoke pre-created ServiceWorker Mojo capabilities. A compromised sandboxed renderer can abuse these leaked capabilities to interact with the parent origin's ServiceWorker and CacheStorage. This allows reading cross-origin data, resulting in a potential Site Isolation bypass.

Affected files:

  • content/browser/renderer_host/navigation_request.cc
  • content/browser/service_worker/service_worker_container_host.cc
  • content/browser/service_worker/service_worker_client.cc
  • content/browser/service_worker/service_worker_context_core.cc
  • third_party/blink/renderer/modules/service_worker/service_worker_network_provider_for_frame.cc

Estimated timestamp from git blame: 2025-01-23

Summary

There is a potential Site Isolation bypass where a CSP-sandboxed iframe incorrectly receives ServiceWorker and CacheStorage Mojo capabilities. If the sandboxed renderer process is compromised, an attacker can use these capabilities to interact with the parent origin's ServiceWorker, allowing them to fetch sensitive cross-origin data and bypass the process isolation boundary.

Technical Details

During a navigation, NavigationRequest::OnStartChecksComplete evaluates whether a ServiceWorker can be created for the frame by checking frame_tree_node_->pending_frame_policy().sandbox_flags. If an <iframe> tag lacks a sandbox attribute, these flags will not include kOrigin, and the browser initializes a service_worker_handle_ to provide ServiceWorker capabilities.

When the network response arrives, it may contain a Content-Security-Policy: sandbox header (without allow-same-origin). The browser correctly parses this, updates FinalPolicies().sandbox_flags with the kOrigin flag, and assigns the navigation to a newly created, unprivileged sandboxed SiteInstance (process isolation).

However, the browser fails to re-verify ServiceWorker eligibility before committing the navigation. In NavigationRequest::CommitNavigation, it checks for the existence of service_worker_handle_ but ignores the updated FinalPolicies().sandbox_flags. Consequently, it ships the ControllerServiceWorker and ServiceWorkerContainerHost Mojo pipes to the sandboxed renderer.

While there is a defense-in-depth check in the legitimate renderer process (ServiceWorkerNetworkProviderForFrame::DidCreateNewDocument checks GetSecurityOrigin().IsOpaque()), a compromised renderer can simply bypass this check and retain the Mojo remotes.

When the compromised renderer sends an IPC via ServiceWorkerContainerHost, the browser-side validation (service_worker_security_utils::AllOriginsMatchAndCanAccessServiceWorkers) uses url_for_access_check(). This returns the logical URL (which matches the parent origin), not the SiteInstance's opaque origin. Furthermore, the ControllerServiceWorker remote allows direct IPC to the parent origin's ServiceWorker in another renderer process, completely bypassing browser validation.

Potential Attacker Steps

(Note: These are suggested steps to trigger the vulnerability; our tooling does not currently have the ability to run code to provide a working PoC).

  1. A victim site (https://victim.example) registers a ServiceWorker with a passthrough fetch handler (e.g., e.respondWith(fetch(e.request))).
  2. The victim site embeds a subresource via an <iframe> without a sandbox attribute.
  3. The server responds to the subresource request with the header Content-Security-Policy: sandbox allow-scripts (without allow-same-origin).
  4. The browser correctly isolates the subresource into a sandboxed renderer process but inadvertently sends the ServiceWorker Mojo capabilities in the CommitNavigation IPC.
  5. An attacker who has compromised the sandboxed renderer (e.g., via a v8 exploit) bypasses the renderer's IsOpaque() check and retains the Mojo remotes.
  6. The attacker fabricates a DispatchFetchEventForSubresource IPC using the ControllerServiceWorker remote, targeting a sensitive cross-origin endpoint (e.g., https://victim.example/api/private_data).
  7. The victim's ServiceWorker fetches the data using its credentials and returns it directly to the compromised sandboxed renderer, completing the data leak.

Suggested Fix

In content/browser/renderer_host/navigation_request.cc, update NavigationRequest::CommitNavigation to verify the final sandbox flags before packing the ServiceWorker capabilities.

Specifically, before calling CommitResponseAndRelease(), check if policy_container_builder_->FinalPolicies().sandbox_flags contains network::mojom::WebSandboxFlags::kOrigin. If it does, the document is an opaque origin and should not have ServiceWorker access. In this case, service_worker_handle_ should be reset/destroyed, and the capabilities should not be sent in the Commit IPC.

Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33


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 browser fails to re-check the final sandbox flags before committing the navigation, so it sends ServiceWorker Mojo capabilities to a renderer that should have been denied them.

Impact

A compromised sandboxed renderer could read cross-origin data and bypass Site Isolation, but the attacker must first compromise the renderer (e.g., via a v8 exploit).

What the attacker needed

Victim site uses ServiceWorker; iframe without sandbox attribute; CSP sandbox header without allow-same-origin; attacker compromises sandboxed renderer

The fix

The fix should verify the final sandbox flags in NavigationRequest::CommitNavigation and reset service_worker_handle_ if the origin is opaque, preventing the capabilities from being sent.

How it was found

  1. A victim site registers a ServiceWorker with a passthrough fetch handler.
  2. The victim site embeds a subresource via an iframe without a sandbox attribute.
  3. The server responds to the subresource request with a CSP sandbox header without allow-same-origin.
  4. The browser isolates the subresource into a sandboxed renderer process but inadvertently sends ServiceWorker Mojo capabilities in the CommitNavigation IPC.
  5. An attacker who has compromised the sandboxed renderer bypasses the renderer's IsOpaque() check and retains the Mojo remotes.
  6. The attacker fabricates a DispatchFetchEventForSubresource IPC using the ControllerServiceWorker remote, targeting a sensitive cross-origin endpoint, and the victim's ServiceWorker fetches the data using its credentials and returns it to…

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 uses a special security header to put a page in a 'sandbox' (a restricted environment), the browser is supposed to cut off all access to powerful features like background workers. Here, the browser forgot to remove some access rights that were set up before the sandbox was applied. If an attacker can break into that sandboxed page, they can still use those leftover rights to steal data from the main site.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.