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

Information leak in ServiceWorker (CVE-2026-79252)

A potential flaw in Chromium's Service Worker navigation handling causes the full unfiltered internal headers of a cross-origin CORS response to be committed to the document. An attacker could read non-CORS-exposed headers such as Server-Timing via script-accessible timing APIs.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 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 Chromium's Service Worker navigation handling propagates the full, unfiltered internal headers of a cross-origin CORS response to the committed document. Consequently, non-CORS-exposed headers such as Server-Timing are leaked and can be read via script-accessible timing APIs of the same-origin document. This occurs because the browser process commits the navigation with the response's full unfiltered internal header list instead of applying the CORS-filtered header list.

Affected files:

  • third_party/blink/common/service_worker/service_worker_loader_helpers.cc
  • third_party/blink/renderer/core/fetch/fetch_response_data.cc
  • third_party/blink/renderer/core/loader/document_loader.cc
  • content/common/service_worker/service_worker_resource_loader.cc
  • content/browser/service_worker/service_worker_main_resource_loader.cc

Estimated timestamp from git blame: 2018-05-15

Potential Service Worker Navigation Leak of Unfiltered kCors Response Headers

Summary

We have identified a potential cross-origin information leak in Chromium's Service Worker navigation handling. When a Service Worker responds to a same-origin navigation request (kNavigate) with a CORS-filtered response (kCors) from a cross-origin endpoint, the committed document is populated with the response's full unfiltered internal header list instead of the CORS-filtered header list.

As a result, sensitive headers that are specifically withheld from CORS exposure (such as Server-Timing or others) can be leaked to the committed document and read by script via PerformanceNavigationTiming.serverTiming or observed through document-processing side effects (e.g., Link preloads or relative CSP report-uri endpoints).

Note: These findings and reproduction steps are based on manual static code analysis; our current tooling does not have the capability to run code to confirm with an active proof of concept.


Root Cause Analysis

The potential vulnerability consists of three main links in the data propagation path, none of which apply CORS-exposed header filtering:

1. Renderer-side Serialization Recurses into the Internal Unfiltered Response

When a Service Worker supplies a response via respondWith (or via the Static-Router cache), it calls Response::PopulateFetchAPIResponse to serialize the response into a Mojo struct (mojom::blink::FetchAPIResponsePtr).

In third_party/blink/renderer/core/fetch/fetch_response_data.cc:

C++
mojom::blink::FetchAPIResponsePtr FetchResponseData::PopulateFetchAPIResponse(
    const KURL& request_url) {
  if (internal_response_) {
    mojom::blink::FetchAPIResponsePtr response =
        internal_response_->PopulateFetchAPIResponse(request_url);  // ← Recurses into unfiltered internal response
    response->response_type = type_;                                // = kCors
    response->cors_exposed_header_names =
        HeaderSetToVector(cors_exposed_header_names_);
    return response;
  }
  ...
  for (const auto& header : HeaderList()->List())
    response->headers.insert(header.first, header.second);          // ← Copies all unfiltered headers

Because internal_response_ represents the unfiltered underlying response, the recursive call populates response->headers with the unfiltered header list. The outer response only overlays response_type = kCors and copies cors_exposed_header_names to the Mojo payload.

2. Browser-side Loader Copies the Full Map with No Filtering

In the browser process, ServiceWorkerMainResourceLoader::StartResponse receives the FetchAPIResponse and populates the navigation's URLResponseHead response headers by calling SaveResponseInfo and SaveResponseHeaders:

In third_party/blink/common/service_worker/service_worker_loader_helpers.cc:

C++
void SaveResponseHeaders(const mojom::FetchAPIResponse& response,
                         network::mojom::URLResponseHead* out_head) {
  out_head->headers =
      ServiceWorkerLoaderHelpers::GetHttpResponseHeaders(response);
  ...
}

scoped_refptr<net::HttpResponseHeaders>
ServiceWorkerLoaderHelpers::GetHttpResponseHeaders(
    const blink::mojom::FetchAPIResponse& response) {
  ...
  for (const auto& item : response.headers) {        // ← Full internal header map
    builder.AddHeader(item.first, item.second);      // ← Missing validation against response.cors_exposed_header_names
  }
  return builder.Build();
}

Although response.cors_exposed_header_names is copied to out_head->cors_exposed_header_names, the loader never uses it to filter out_head->headers. As a result, the browser commits the navigation using the full, unfiltered header list of the cross-origin response.

3. DocumentLoader Unconditionally Bypasses Timing Constraints

When the navigation commits, DocumentLoader builds its ResourceResponse from the URLResponseHead received from the browser. For navigation timing, DocumentLoader unconditionally overrides timing-allow permissions because a document is considered same-origin with its own timeline:

In third_party/blink/renderer/core/loader/document_loader.cc:

C++
response_.SetTimingAllowPassed(true);
mojom::blink::ResourceTimingInfoPtr navigation_timing_info =
    CreateResourceTimingInfo(base::TimeTicks(), ... , &response_);

Because response_ contains the unfiltered raw headers from the browser and TimingAllowPassed is set to true, CreateResourceTimingInfo reads the unfiltered Server-Timing header field and populates PerformanceNavigationTiming:

In third_party/blink/renderer/platform/loader/fetch/resource_timing_utils.cc:

C++
if (response->TimingAllowPassed()) {
  info->allow_timing_details = true;
  info->server_timing = ParseServerTimingFromHeaderValueToMojo(
      response->HttpHeaderField(http_names::kServerTiming));   // ← Extracts the unfiltered header

Suggested/Potential Trigger Path

An attacker could potentially exploit this behavior via the following steps:

  1. A victim API at https://victim.example/api responds with Access-Control-Allow-Origin: * and a sensitive Server-Timing: backend;desc="shard-id=123" header that is not exposed in Access-Control-Expose-Headers.

  2. The attacker registers a Service Worker on https://attacker.example/ that intercepts navigation requests to /leak and responds with the CORS fetch:

    JavaScript
    self.addEventListener('fetch', e => {
      if (new URL(e.request.url).pathname === '/leak' && e.request.mode === 'navigate') {
        e.respondWith(fetch('https://victim.example/api', { mode: 'cors' }));
      }
    });
    
  3. The attacker page creates a same-origin iframe targeting /leak:

    JavaScript
    const iframe = document.createElement('iframe');
    iframe.src = '/leak';
    document.body.appendChild(iframe);
    
  4. Once loaded, the attacker's main page accesses the iframe's performance entries:

    JavaScript
    const entry = iframe.contentWindow.performance.getEntriesByType('navigation')[0];
    console.log(entry.serverTiming[0].description); // Outputs "shard-id=123"
    

Suggested Fix

To prevent this leak, the browser process must filter the headers before copying them into the navigation response metadata.

Specifically, in ServiceWorkerLoaderHelpers::GetHttpResponseHeaders (or inside SaveResponseHeaders), if the response has response_type == network::mojom::FetchResponseType::kCors, we should only copy the headers that are explicitly allowed in response.cors_exposed_header_names (and any CORS-safelisted response headers), rather than copying the entire response.headers map.

Evaluated with Chrome root at commit: 70c6813870b6701fa16670076bf633ee6c3a439f


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 browser process copies the full internal header map from the Service Worker response into the navigation response without filtering it against the CORS-exposed header names.

Impact

An attacker could read non-CORS-exposed headers such as Server-Timing from a cross-origin response, potentially leaking sensitive information; the report notes this is based on static analysis and not confirmed with an active proof of concept.

What the attacker needed

Victim API returns CORS headers and sensitive Server-Timing; attacker controls a Service Worker on their origin; victim visits attacker page

The fix

The browser process should filter headers before copying them into the navigation response metadata, only copying headers allowed by cors_exposed_header_names for CORS responses.

How it was found

  1. A victim API responds with a CORS header and a sensitive Server-Timing header not exposed via Access-Control-Expose-Headers.
  2. The attacker registers a Service Worker that intercepts navigation requests and responds with a CORS fetch to the victim API.
  3. The attacker page creates a same-origin iframe targeting the intercepted path.
  4. The attacker reads the iframe's performance navigation entry to obtain the leaked Server-Timing value.

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 fetches data from another site, the browser normally hides most response headers for security. This report suggests that in a specific case involving Service Workers (scripts that can intercept network requests), the browser might accidentally show all headers, letting an attacker read sensitive information like server timing details.

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.