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

Incorrect authorization in ServiceWorker (CVE-2026-79136)

Three logic flaws in Chrome's Service Worker and storage permission handling let a third-party iframe obtain a handle to a first-party Service Worker, start it, and then read and write unpartitioned first-party IndexedDB when third-party storage partitioning is disabled. This bypasses third-party cookie blocking and enables cross-site tracking.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 months

Flapjack, 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 Chrome Security team. Please see go/chrome-ai-generated-security-bugs-faq for more information.

Overview: A series of logic flaws allow a third-party iframe to bypass third-party cookie blocking and access unpartitioned 1P storage (when partitioning is disabled). A premature resolution of navigator.serviceWorker.ready gives the 3P iframe a handle to the 1P Service Worker, while a missing async method override in the renderer's content settings proxy completely bypasses storage permission checks for running Service Workers.

Affected files:

  • content/browser/service_worker/service_worker_controllee_request_handler.cc
  • content/browser/service_worker/service_worker_version.cc
  • components/embedder_support/content_settings_utils.cc

Estimated timestamp from git blame: 2025-05-05

Description

There are logic flaws in the Service Worker and storage permission architectures that potentially allow a malicious third-party iframe to bypass Third-Party Cookie blocking. When Third-Party Storage Partitioning is disabled (e.g., via enterprise policy or flags), this allows the 3P iframe to access unpartitioned first-party (1P) storage, enabling cross-site tracking.

The exploit relies on three distinct flaws:

Flaw 1: Premature Resolution of navigator.serviceWorker.ready When an iframe navigates to a URL controlled by a previously installed 1P Service Worker, ServiceWorkerControlleeRequestHandler::ContinueWithRegistration evaluates if the worker is allowed to control the page. It adds the registration to the client's matching list before performing the AllowServiceWorker check:

C++
// content/browser/service_worker/service_worker_controllee_request_handler.cc
void ServiceWorkerControlleeRequestHandler::ContinueWithRegistration(...) {
  ...
  // FLAW 1: This synchronously resolves navigator.serviceWorker.ready in the renderer
  service_worker_client_->AddMatchingRegistration(registration.get());
  
  // This evaluates to false if 3P cookies are blocked, falling back to network.
  AllowServiceWorkerResult allow_service_worker = 
      GetContentClient()->browser()->AllowServiceWorker(...);

Even though the navigation correctly falls back to the network, the renderer-side navigator.serviceWorker.ready promise has already resolved, providing the 3P iframe with a handle to the 1P ServiceWorkerRegistration.

Flaw 2: Fake 1P Contexts in Worker Start Checks The 3P iframe can use the handle to call registration.active.postMessage(). To handle the message, the browser starts the worker and calls ServiceWorkerVersion::IsStartWorkerAllowed. This function synthesizes a fake 1P top_frame_origin by passing url::Origin::Create(scope_) to AllowServiceWorker. Because the origin matches the top_frame_origin, CookieSettings is tricked into treating it as a 1P request, bypassing the 3P cookie block and allowing the worker to start.

Flaw 3: Renderer-Side Storage Permission Bypass Once the worker is running, it can call indexedDB.open(). In the renderer, IDBFactory::AllowIndexedDB checks permissions by calling the asynchronous settings_client->AllowStorageAccess().

However, the WebContentSettingsClient used by Service Workers (ServiceWorkerContentSettingsProxy) only overrides the synchronous AllowStorageAccessSync method. It fails to override the asynchronous AllowStorageAccess method. Consequently, the call falls back to the default implementation in WebContentSettingsClient:

C++
// third_party/blink/public/platform/web_content_settings_client.h
virtual void AllowStorageAccess(..., base::OnceCallback<void(bool)> callback) {
  std::move(callback).Run(true);
}

This immediately returns true, completely bypassing the browser-side storage permission checks (such as ServiceWorkerContentSettingsProxyImpl::AllowIndexedDB). Since browser-side IndexedDB binding (BucketContext::Open) performs no secondary permission checks, the Service Worker is granted access.

Impact

An attacker can read and write 1P tracking identifiers to IndexedDB from a 3P iframe, bypassing the user's 3P cookie blocking preferences. If Third-Party Storage Partitioning is disabled, the worker's StorageKey behaves as if it only contains the origin, granting full access to the user's unpartitioned 1P IndexedDB and CacheStorage.

Potential Reproduction Steps

Note: These are suggested steps based on code analysis.

  1. Disable Third-Party Storage Partitioning and block Third-Party Cookies.
  2. User visits https://attacker.com (1P). The site registers a Service Worker and writes a tracking ID to IndexedDB.
  3. User visits https://victim.com (1P). victim.com embeds <iframe src="https://attacker.com/iframe.html">.
  4. Inside the 3P iframe.html, navigator.serviceWorker.ready resolves (Flaw 1).
  5. iframe.html calls registration.active.postMessage("get_id").
  6. The Service Worker starts (Flaw 2) and calls indexedDB.open(), which is granted without browser-side checks (Flaw 3).
  7. The worker reads the 1P tracking ID and posts it back to the 3P iframe.

Suggested Fix

  1. Move the call to service_worker_client_->AddMatchingRegistration(registration.get()); in ServiceWorkerControlleeRequestHandler::ContinueWithRegistration to after the AllowServiceWorker check evaluates to true.
  2. Ensure ServiceWorkerContentSettingsProxy and SharedWorkerContentSettingsProxy correctly override the asynchronous AllowStorageAccess method to route the permission check to the browser process, or update IDBFactory and CacheStorage to use the synchronous method if appropriate for workers.
  3. Review ServiceWorkerVersion::IsStartWorkerAllowed to ensure it accurately reflects the context requesting the worker start, rather than always synthesizing a 1P context.

Evaluated with Chrome root at commit: c0eb5541aebfa4ea08806eaf6e94bcc69f87ab2f


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 three separate mistakes: a Service Worker registration is added to the client before the permission check, the worker start check fabricates a first-party origin, and the worker's content settings proxy does not override the asynchronous storage permission method so it defaults to allowing access.

Impact

An attacker could read and write first-party tracking identifiers in IndexedDB from a third-party iframe, bypassing third-party cookie blocking, but only when third-party storage partitioning is disabled.

What the attacker needed

Third-party storage partitioning disabled; third-party cookies blocked; attacker controls a site with a Service Worker; victim site embeds attacker iframe

The fix

The report suggests moving the registration addition after the permission check, overriding the asynchronous storage access method in the worker content settings proxies, and reviewing the worker start check to use the real requesting context.

How it was found

  1. Disable third-party storage partitioning and block third-party cookies.
  2. Visit the attacker's site as a first party so it registers a Service Worker and writes a tracking ID to IndexedDB.
  3. Visit the victim site, which embeds an iframe pointing to the attacker's site.
  4. Inside the third-party iframe, navigator.serviceWorker.ready resolves, giving a handle to the first-party worker.
  5. The iframe posts a message to the worker, which starts because the start check treats it as first-party.
  6. The worker opens IndexedDB without a browser-side permission check, reads the tracking ID, and posts it back to the iframe.

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.

Websites can store small pieces of data in your browser, such as cookies or IndexedDB, to remember you. Browsers try to stop one website from reading another website's stored data, especially when the first website is embedded inside the second as a third-party frame. This report describes coding mistakes in Chrome that let a malicious embedded frame reach the outer website's stored data and use it to track you.

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.