Skip to content
Race condition Advisory Advanced CVE-2026-7954

Race in Shared Storage (CVE-2026-7954)

A race condition in SharedStorageWorkletHost allows a compromised renderer to access victim Shared Storage data before the mandatory cross-origin opt-in check completes. An attacker can prolong this window indefinitely by hanging the worklet script load, enabling unauthorised read/write access to victim data.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 41 days

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: A race condition in SharedStorageWorkletHost potentially allows a compromised renderer to access victim Shared Storage data before the mandatory .well-known cross-origin opt-in check completes. This bypasses the security requirement that cross-origin data origins must explicitly opt-in to worklet access via a trusted-origins file. The attacker can indefinitely prolong this access by deliberately hanging the worklet's script load.

Affected files:

  • content/browser/shared_storage/shared_storage_worklet_host.cc

Estimated timestamp from git blame: 2025-11-25

Vulnerability Description

A race condition exists in SharedStorageWorkletHost that potentially allows a compromised renderer to bypass the cross-origin opt-in requirement for Shared Storage. When a cross-origin worklet is created, the host immediately binds and dispatches the SharedStorageWorkletServiceClient remote to the renderer process before the asynchronous fetch of the mandatory /.well-known/shared-storage/trusted-origins opt-in file has completed.

Because the Mojo receiver for SharedStorageWorkletServiceClient lacks message gating and its storage-accessing handlers (such as SharedStorageGet and SharedStorageUpdate) do not verify the current opt-in state, an attacker-controlled renderer can issue Mojo calls to read or modify a victim's cross-origin data during the fetch window.

Furthermore, an attacker can extend this window indefinitely by intentionally hanging the fetch of the worklet script (AddModule), preventing the browser from ever evaluating the failed opt-in check and shutting down the worklet.

Potential Attack Steps

(Note: These are suggested steps based on static analysis; a working proof-of-concept has not yet been executed.)

  1. Setup: An attacker compromises a renderer process (e.g., hosting https://attacker.com).
  2. Initiate Worklet Creation: The attacker crafts a CreateWorklet Mojo message over the blink.mojom.SharedStorageDocumentService interface, specifying script_source_url as https://attacker.com/script.js and data_origin as https://victim.com.
  3. Host Initialization: The browser processes this request in SharedStorageDocumentServiceImpl::CreateWorklet. It creates a SharedStorageWorkletHost, which identifies that a cross-origin opt-in is required (needs_data_origin_opt_in_ = true).
  4. Process Allocation: On platforms where strict Site Isolation is not enforced for the target origin (e.g., Android), the SharedStorageRenderThreadWorkletDriver assigns the victim.com worklet to run in the attacker's compromised renderer process.
  5. Premature Binding: SharedStorageWorkletHost::GetAndConnectToSharedStorageWorkletService() immediately calls Initialize() on the worklet service. This binds the SharedStorageWorkletServiceClient receiver in the browser and dispatches the remote to the compromised renderer before the .well-known opt-in check completes.
  6. Hang Script Load: The attacker configures their server at https://attacker.com/script.js to hang the network fetch indefinitely. This keeps the AddModule script loading state pending.
  7. Exploit Remote: The attacker intercepts the prematurely dispatched SharedStorageWorkletServiceClient remote in their compromised renderer.
  8. Bypass Checks: The attacker immediately sends unauthorized storage-access Mojo messages (e.g., SharedStorageGet). The corresponding handlers in SharedStorageWorkletHost only check general user settings via IsSharedStorageAllowed(), failing to verify the pending .well-known data_origin_opt_in_state_.
  9. Indefinite Access: Even after the asynchronous .well-known check to victim.com eventually fails, MaybeFinishCreateWorklet() returns early because the script load (script_loading_state_) is still pending. The worklet is never expired, granting the attacker an indefinite, unauthorized read/write channel to victim.com's Shared Storage data.

Impact

This vulnerability constitutes a high-severity cross-origin data leak and modification risk (S1 Site Isolation Bypass). A compromised renderer can perform unauthorized operations against a victim's Shared Storage, completely bypassing the .well-known opt-in security mechanism.

Recommended Fix

Ensure that the SharedStorageWorkletServiceClient Mojo receiver does not process messages until the .well-known opt-in check has successfully completed. This can be achieved by:

  1. Deferring Binding: Wait to bind and dispatch the SharedStorageWorkletServiceClient remote until data_origin_opt_in_state_ is successfully resolved in MaybeFinishCreateWorklet().
  2. Explicit Checks: Alternatively, add an explicit check for a successful data_origin_opt_in_state_ in all storage-accessing Mojo handlers within SharedStorageWorkletHost (e.g., SharedStorageGet, SharedStorageUpdate, etc.) when needs_data_origin_opt_in_ is true.

Evaluated with Chrome root at commit: 0eb4855bda702feaaa8b899336664f97e3df88b8


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. Please feel free to reach out to me if you have concerns or feedback.

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

The browser binds and dispatches the Mojo remote for SharedStorageWorkletServiceClient before the asynchronous .well-known opt-in check completes, and the storage-accessing handlers do not verify the opt-in state.

Impact

A compromised renderer could perform unauthorised read and write operations against a victim's Shared Storage, bypassing the .well-known opt-in mechanism, though this requires a compromised renderer and may be limited on platforms with strict Site Isolation.

What the attacker needed

Compromised renderer process; platform without strict Site Isolation; attacker controls a server to hang script fetch

The fix

The SharedStorageWorkletServiceClient Mojo receiver should not process messages until the .well-known opt-in check has successfully completed, either by deferring binding or by adding explicit opt-in state checks in all storage-accessing handlers.

How it was found

  1. Compromise a renderer process hosting an attacker-controlled origin.
  2. Send a CreateWorklet Mojo message specifying a script source URL on the attacker's origin and a data origin belonging to the victim.
  3. The browser creates a SharedStorageWorkletHost and marks that cross-origin opt-in is required.
  4. On platforms without strict Site Isolation, the victim's worklet is assigned to the attacker's compromised renderer process.
  5. The host binds and dispatches the SharedStorageWorkletServiceClient remote to the renderer before the opt-in check completes.
  6. The attacker's server hangs the script fetch indefinitely, keeping the worklet alive and allowing unauthorised storage-access Mojo calls.

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.

Shared Storage is a browser feature that lets websites store data that can be shared across different sites, but only if the data owner explicitly allows it via a special file. This report found that a malicious website could sneak a peek at another site's shared data before the browser finished checking that permission file. The attacker could keep the check from finishing by making their own script load very slowly, giving them a long time to read or change the victim's data.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.