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

Improper access control in Workers (CVE-2026-79201)

A logic error in how the browser handles Clear-Site-Data headers on subresource fetches from Service or Shared Workers means the deletion scope is calculated too broadly. An attacker-controlled site could use a worker to make a credentialed fetch to a victim's logout endpoint and wipe the victim's first-party storage instead of only the partitioned data.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 3 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: Subresource fetches initiated by Service Workers or Shared Workers that receive a Clear-Site-Data header fail to correctly calculate a StorageKey in the browser process. This causes the resulting data deletion to fall back to an over-broad scope that impacts the target origin's first-party storage rather than its partitioned storage. This issue potentially allows cross-origin data destruction and a bypass of storage partitioning boundaries.

Affected files:

  • content/browser/storage_partition_impl.cc
  • content/browser/browsing_data/clear_site_data_utils.cc
  • content/browser/browsing_data/browsing_data_filter_builder_impl.cc
  • third_party/blink/common/storage_key/storage_key.cc
  • content/browser/service_worker/embedded_worker_instance.cc
  • content/browser/worker_host/shared_worker_host.cc
  • services/network/network_service_network_delegate.cc
  • content/browser/browsing_data/clear_site_data_handler.cc

Estimated timestamp from git blame: 2022-09-13

Summary

A potential logic error exists in how Clear-Site-Data response headers are handled for subresource fetches initiated by Service Workers or Shared Workers. When such a fetch receives a Clear-Site-Data header, the browser process fails to associate the correct partitioned StorageKey with the request. This leads to a deletion scope that encompasses the responding origin's first-party data, rather than being confined to the third-party partition.

Root Cause Analysis

When a network request receives a Clear-Site-Data header, the network service notifies the browser via URLLoaderNetworkServiceObserver::OnClearSiteData. The browser implementation in StoragePartitionImpl::OnClearSiteData calls CalculateStorageKey to determine the scope of deletion.

In content/browser/storage_partition_impl.cc:

C++
std::optional<blink::StorageKey> StoragePartitionImpl::CalculateStorageKey(
    const url::Origin& origin,
    const base::UnguessableToken* nonce) {
  ...
  NavigationOrDocumentHandle* handle =
      url_loader_network_observers_.current_context().navigation_or_document();
  if (!handle) {
    return std::nullopt;
  }
  ...
}

For Service Workers and Shared Workers, the URLLoaderNetworkContext is initialized without a NavigationOrDocumentHandle (lines 3873-3878). Consequently, CalculateStorageKey returns std::nullopt.

When this std::nullopt is passed to the deletion logic (SiteDataClearer), it defaults to using BrowsingDataFilterBuilder::OriginMatchingMode::kThirdPartiesIncluded. Under this mode, blink::StorageKey::MatchesOriginForTrustedStorageDeletion returns true for the origin's first-party storage keys (where origin and top-level site match), but false for the actual partitioned storage key where the fetch occurred. This results in the victim's first-party data being wiped while the third-party partitioned data remains.

Potential Impact

An attacker-controlled site could potentially use a Service Worker to perform a credentialed fetch to a victim site's logout endpoint (which typically serves Clear-Site-Data: "storage"). This would trigger the browser to wipe the victim's first-party LocalStorage, IndexedDB, and Service Worker registrations, effectively performing a cross-origin state reset.

Suggested Reproduction Steps

Note: These steps are based on code analysis; our current environment does not support executing a live Proof of Concept.

  1. Set up a victim site https://victim.com/logout that responds with Clear-Site-Data: "storage".
  2. Ensure the user has active first-party state (e.g., LocalStorage) on https://victim.com.
  3. The user visits https://attacker.com, which registers a Service Worker.
  4. The attacker's Service Worker executes: fetch('https://victim.com/logout', {mode: 'no-cors', credentials: 'include'}).
  5. Observe if the first-party data for victim.com is cleared, while the partitioned data for (victim.com, top=attacker.com) persists.

Suggested Fix

Modify URLLoaderNetworkContext in content/browser/storage_partition_impl.h to store the blink::StorageKey of the worker when initialized via the kSharedOrServiceWorkerContext constructor. Update StoragePartitionImpl::CalculateStorageKey to use this stored key if NavigationOrDocumentHandle is unavailable.

Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a


Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:

  • If you are familiar with the severity guidelines, you may adjust the severity.
  • If this is a false positive, and there's no work to be done, please close as WAI.
  • If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.

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 worker's URLLoaderNetworkContext has no NavigationOrDocumentHandle, so CalculateStorageKey returns null and the deletion falls back to a mode that matches the origin's first-party storage keys.

Impact

An attacker could potentially wipe a victim site's first-party LocalStorage, IndexedDB and Service Worker registrations, though the report is based on code analysis and no live proof of concept was run.

What the attacker needed

Victim has first-party data on target site; target endpoint sends Clear-Site-Data; victim visits attacker-controlled site; attacker site registers a Service Worker

The fix

The worker's StorageKey should be stored when the context is initialised and used by CalculateStorageKey when no NavigationOrDocumentHandle is available.

How it was found

  1. Set up a victim site whose logout endpoint responds with a Clear-Site-Data storage header.
  2. Ensure the user has first-party state stored for the victim site.
  3. Have the user visit an attacker site that registers a Service Worker.
  4. The attacker's worker makes a credentialed no-cors fetch to the victim's logout endpoint.
  5. Observe whether the victim's first-party data is cleared while the partitioned data persists.

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 data in your browser, and a site can ask the browser to delete its own stored data by sending a special response header. Browsers keep separate copies of that data for each site that embeds another site, so one site's copy should not affect another's. Here the browser lost track of which copy it was dealing with and deleted the wrong, broader set of 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.

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.