Skip to content
Info disclosure Advisory Advanced CVE-2026-87574

Information leak in ServiceWorker (CVE-2026-87574)

A Service Worker subresource loader unconditionally set a flag that allowed timing and size metadata of cross-origin opaque responses to be exposed. An attacker could use a Service Worker to fetch a cross-origin resource and then read its Server-Timing headers and exact body sizes via the Performance Timeline, bypassing Same-Origin Policy restrictions.

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: A potential vulnerability in ServiceWorkerSubresourceLoader unconditionally sets the timing_allow_passed flag to true for all subresources served through a Service Worker. This can potentially allow same-origin pages to read sensitive cross-origin Server-Timing headers and exact response sizes of opaque resources, bypassing the Same-Origin Policy and Timing-Allow-Origin restrictions. This issue does not require a compromised renderer to exploit.

Affected files:

  • content/renderer/service_worker/service_worker_subresource_loader.cc
  • third_party/blink/renderer/core/fetch/fetch_response_data.cc
  • third_party/blink/common/service_worker/service_worker_loader_helpers.cc

Estimated timestamp from git blame: 2022-09-07

Root Cause Analysis

In content/renderer/service_worker/service_worker_subresource_loader.cc inside ServiceWorkerSubresourceLoader::StartResponse, the response's timing_allow_passed flag is unconditionally set to true for any subresource response served through a Service Worker:

C++
// content/renderer/service_worker/service_worker_subresource_loader.cc
blink::ServiceWorkerLoaderHelpers::SaveResponseInfo(*response,
                                                    response_head_.get());
...
// Constructed subresource responses are always same-origin as the requesting
// client.
response_head_->timing_allow_passed = true;

This assumption is incorrect when a Service Worker fetch handler intercepts a request and resolves it via a cross-origin response (e.g., e.respondWith(fetch(crossOriginURL, {mode: 'no-cors'}))). In this scenario, the response is actually cross-origin and opaque, and should not have its timing/size metadata exposed to the requesting origin.

During response serialization, FetchResponseData::PopulateFetchAPIResponse in third_party/blink/renderer/core/fetch/fetch_response_data.cc copies the unfiltered internal response headers (including Server-Timing) into the Mojo FetchAPIResponse::headers map. These headers are then populated verbatim into response_head_->headers via SaveResponseInfo calling SaveResponseHeaders -> GetHttpResponseHeaders in third_party/blink/common/service_worker/service_worker_loader_helpers.cc.

Because timing_allow_passed is set to true, the page-side loader evaluates response->TimingAllowPassed() as true. This causes resource_timing_utils.cc to parse the Server-Timing headers and expose them directly via the Performance Timeline. Furthermore, since ResourceTimingUseCORSForBodySizes is disabled in production by default, forcing timing_allow_passed to true also incorrectly exposes the detailed encodedBodySize and decodedBodySize of opaque responses.


Potential Attack Steps

Note: The following are potential steps that an attacker might follow to trigger the vulnerability. Our tooling agent does not have the capability to run code to confirm this with a live PoC.

  1. An attacker-controlled page registers a Service Worker that listens for fetch events.

  2. The Service Worker fetch event listener intercepts a same-origin subresource request (e.g., /probe) and responds with a cross-origin no-cors fetch to a sensitive victim endpoint:

    JavaScript
    event.respondWith(fetch('https://victim.example/api', {mode: 'no-cors', credentials: 'include'}));
    
  3. The page initiates the load of /probe (e.g., via {{media:0}} or fetch('/probe')).

  4. The loader process handles the request through ServiceWorkerSubresourceLoader, which overrides timing_allow_passed to true and delivers the unfiltered headers to the page-side ResourceResponse.

  5. The attacker's page JavaScript queries the performance timeline:

    JavaScript
    const entry = performance.getEntriesByName(location.origin + '/probe')[0];
    console.log(entry.serverTiming); // Discloses parsed cross-origin Server-Timing fields
    console.log(entry.encodedBodySize); // Discloses exact cross-origin response body size
    

Suggested Fix

Instead of unconditionally setting timing_allow_passed = true inside ServiceWorkerSubresourceLoader::StartResponse, the loader should perform a proper origin and/or Timing-Allow-Origin check similar to the one implemented in ServiceWorkerMainResourceLoader::StartResponse:

C++
if (resource_request_.request_initiator && response_head_->parsed_headers &&
    (resource_request_.request_initiator->IsSameOriginWith(resource_request_.url) ||
     network::TimingAllowOriginCheck(response_head_->parsed_headers->timing_allow_origin,
                                     *resource_request_.request_initiator))) {
  response_head_->timing_allow_passed = true;
}

This ensures that timing details and body sizes of cross-origin, opaque responses served by a Service Worker are not leaked to unauthorized origins.

Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8


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

The ServiceWorkerSubresourceLoader unconditionally set timing_allow_passed to true for all subresource responses, even when the response was actually cross-origin and opaque.

What the attacker needed

Attacker-controlled page; victim visits attacker page; Service Worker support

The fix

The loader should perform a proper origin and Timing-Allow-Origin check before setting timing_allow_passed to true, similar to ServiceWorkerMainResourceLoader.

How it was found

  1. An attacker-controlled page registers a Service Worker that listens for fetch events.
  2. The Service Worker intercepts a same-origin subresource request and responds with a cross-origin no-cors fetch to a sensitive endpoint.
  3. The page initiates the load of the subresource.
  4. The loader process handles the request and overrides timing_allow_passed to true, delivering unfiltered headers to the page.
  5. The attacker's page JavaScript queries the performance timeline to read serverTiming and encodedBodySize.

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 web page loads a resource from another site, the browser normally hides details like how long it took or how big it was, to protect privacy. This report found that a Service Worker (a script that can intercept network requests) could trick the browser into revealing those details for cross-origin resources. An attacker could then learn sensitive information about a victim's responses, such as response sizes or server timing data.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.