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

Side-channel information leakage in ResourceTiming (CVE-2026-3929)

A Service Worker subresource loader unconditionally marks constructed responses as passing the timing allow check, exposing detailed timing and size information for cross-origin resources that normally restrict these fields. An attacker controlling a Service Worker can obtain non-zero responseStart, transferSize, and nextHopProtocol for resources from other origins without Timing-Allow-Origin.

Povcfe Follow

Originally disclosed on Chrome VRP

Bounty$2,000 Medium View original
  • Fix shipped in 50 days

Report description

Service Worker subresource responses expose detailed resource timing information for cross-origin resources that are normally restricted, leading to an information leak in the Resource Timing API


Bug location

Where do you want to report your vulnerability?

Chrome VRP – Report security issues affecting the Chrome browser. See program rules

Which URL (or repository) have you found the vulnerability in?

https://chromium.googlesource.com/chromium/src/


The problem

Please describe the technical details of the vulnerability

Chromium exposes detailed network timing and size information for resources via the Resource Timing API (performance.getEntriesByType("resource")). To protect cross-origin privacy, these details are only supposed to be available when the response satisfies the Timing-Allow-Origin (TAO) policy or is same-origin with the calling context.

For subresources intercepted by a Service Worker, the renderer-side subresource loader assumes that constructed responses are always same-origin with the client and unconditionally marks them as passing the timing allow check, regardless of the actual response origin or TAO headers.

In ServiceWorkerSubresourceLoader::StartResponse the URL loader head is filled from the Service Worker FetchAPIResponse, and then timing_allow_passed is set to true for all constructed subresource responses:

C++
// chromium/src/content/renderer/service_worker/service_worker_subresource_loader.cc
void ServiceWorkerSubresourceLoader::StartResponse(
    blink::mojom::FetchAPIResponsePtr response,
    blink::mojom::ServiceWorkerStreamHandlePtr body_as_stream) {
  // ...
  blink::ServiceWorkerLoaderHelpers::SaveResponseInfo(*response,
                                                      response_head_.get());
  response_head_->response_start = base::TimeTicks::Now();
  response_head_->load_timing.receive_headers_start = base::TimeTicks::Now();
  response_head_->load_timing.receive_headers_end =
      response_head_->load_timing.receive_headers_start;
  response_source_ = response->response_source;

  // Constructed subresource responses are always same-origin as the requesting
  // client.
  response_head_->timing_allow_passed = true;
  // ...
}

By contrast, the normal network loader path computes timing_allow_passed based on an explicit timing-allow-origin check:

C++
// chromium/src/services/network/cors/cors_url_loader.cc
// (simplified)
timing_allow_failed_flag_ = !PassesTimingAllowOriginCheck(*response_head);
response_head->timing_allow_passed = !timing_allow_failed_flag_;

On the Blink side, this timing_allow_passed flag directly controls whether detailed timing and connection metadata are exposed to JavaScript. In CreateResourceTimingInfo, if TimingAllowPassed() is true, the allow_timing_details flag is set and the full set of fields are populated:

C++
// chromium/src/third_party/blink/renderer/platform/loader/fetch/resource_timing_utils.cc
mojom::blink::ResourceTimingInfoPtr CreateResourceTimingInfo(
    base::TimeTicks start_time,
    const KURL& initial_url,
    const ResourceResponse* response) {
  mojom::blink::ResourceTimingInfoPtr info =
      mojom::blink::ResourceTimingInfo::New();
  info->start_time = start_time;
  info->name = initial_url;
  info->response_end = base::TimeTicks::Now();
  if (!response) {
    return info;
  }

  if (response->TimingAllowPassed()) {
    info->allow_timing_details = true;
    info->server_timing = ParseServerTimingFromHeaderValueToMojo(
        response->HttpHeaderField(http_names::kServerTiming));
    info->cache_state = response->CacheState();
    info->alpn_negotiated_protocol = response->AlpnNegotiatedProtocol().IsNull()
                                         ? g_empty_string
                                         : response->AlpnNegotiatedProtocol();
    info->connection_info = response->ConnectionInfoString().IsNull()
                                ? g_empty_string
                                : response->ConnectionInfoString();

    info->did_reuse_connection = response->ConnectionReused();
    // Use SecurityOrigin::Create to handle cases like blob:https://.
    info->is_secure_transport = base::Contains(
        url::GetSecureSchemes(),
        SecurityOrigin::Create(response->ResponseUrl())->Protocol().Ascii());
    info->timing = response->GetResourceLoadTiming()
                       ? response->GetResourceLoadTiming()->ToMojo()
                       : nullptr;
  } else {
    // Only limited timing fields are exposed when the timing allow check fails.
    // ...
  }
  // ...
}

ResourceResponse explicitly documents that the response URL may differ from the request URL when a Service Worker responds with a different underlying resource:

C++
// chromium/src/third_party/blink/renderer/platform/loader/fetch/resource_response.h
// ...
// Specifically, if a service worker responded to the request for this
// resource, it may have fetched an entirely different URL and responded with
// that resource. WasFetchedViaServiceWorker() and ResponseUrl() can be used
// to determine whether and how a service worker responded to the request.
// Example service worker code:
//
// onfetch = (event => {
//   if (event.request.url == 'https://abc.com')
//     event.respondWith(fetch('https://def.com'));
// });
//
// If this service worker responds to an "https://abc.com" request, then for
// the resulting ResourceResponse, CurrentRequestUrl() is "https://abc.com",
// WasFetchedViaServiceWorker() is true, and ResponseUrl() is
// "https://def.com".
const KURL& CurrentRequestUrl() const;
void SetCurrentRequestUrl(const KURL&);
// ...
KURL ResponseUrl() const;

The test code under web/fetch_timing/ sets up exactly this pattern:

  • An HTML page served from one origin, for example http://localhost:8080/index.html, registers a Service Worker whose scope covers /proxy.
  • The page offers two actions:
    • Load a resource directly from http://localhost:9000/target.bin via an <img> tag (cross-origin request).
    • Load the same underlying resource via a same-origin {{media:0}}, where the Service Worker fetches http://localhost:9000/target.bin with mode: "no-cors" and returns the response.
  • After each load, the page inspects performance.getEntriesByType("resource") and logs key fields (responseStart, responseEnd, transferSize, encodedBodySize, decodedBodySize, nextHopProtocol) for the corresponding PerformanceResourceTiming entry.

In this setup:

  • The direct cross-origin load from http://localhost:8080 to http://localhost:9000/target.bin produces a timing entry where sensitive fields are cleared or zeroed, for example:

    • responseStart: 0
    • transferSize: 0
    • encodedBodySize: 0
    • decodedBodySize: 0
    • nextHopProtocol: ""
  • The Service Worker–mediated load uses a same-origin URL such as http://localhost:8080/proxy?... as the observable resource name, but the Service Worker internally fetches the cross-origin target from http://localhost:9000. For this entry, the logged timing data includes detailed values, for example:

    • non-zero responseStart and responseEnd
    • transferSize and nextHopProtocol populated

This demonstrates that code running in the origin that controls the Service Worker can obtain detailed timing and size information about a resource whose actual origin is different and that does not opt in via Timing-Allow-Origin.

Impact analysis

Who can exploit the vulnerability:

  • Any web origin that can register and control a Service Worker for its own pages can exploit this issue for subresource requests it initiates (for example, an attacker-controlled site with a Service Worker whose scope covers a /proxy path).

What they gain when doing so:

  • The attacking origin can obtain detailed timing and connection metadata (such as non-zero responseStart / responseEnd, transferSize, encodedBodySize, decodedBodySize, and nextHopProtocol) for resources that are actually fetched from a different origin and would normally have these fields restricted by the Resource Timing API.
  • This additional information can be used to:
    • perform cross-site performance and availability probing of arbitrary URLs reachable from the browser;
    • infer limited aspects of user or server state from response timing and size patterns (for example, presence of particular resources or cache behavior);
    • strengthen cross-origin device or network fingerprinting by incorporating timing and protocol characteristics of external resources.

The cause

What version of Chrome have you found the security issue in?

145.0.7632.1/stable

Is the security issue related to a crash?

No, it is not related to a crash.

Choose the type of vulnerability

Information Leak

How would you like to be publicly acknowledged for your report?

Povcfe of Tencent Security Xuanwu Lab

The original report as published on the Chromium issue tracker, by Povcfe of Tencent Security Xuanwu Lab. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

Context

Chrome's Resource Timing API exposes network timing and size information for resources loaded by a page through performance.getEntriesByType("resource"). To protect cross-origin privacy, the detailed fields are only meant to be available when the response is same-origin with the calling context or satisfies the Timing-Allow-Origin (TAO) policy. The report concerns the interaction between that policy and subresources whose responses are constructed by a Service Worker.

The affected component is Chromium's Service Worker subresource loader, and the issue was reported through the Chrome Vulnerability Reward Program against the Chromium source repository. The researcher is credited as Povcfe of Tencent Security Xuanwu Lab, the weakness is classified as side-channel information leakage, and the issue was found in Chrome 145.0.7632.1/stable. It is not related to a crash.

Setup

The researcher built a test page under web/fetch_timing/ with two origins:

  • http://localhost:8080, which serves index.html and registers a Service Worker whose scope covers /proxy.
  • http://localhost:9000, which serves target.bin, the cross-origin resource of interest.

The page offers two actions:

  1. Load http://localhost:9000/target.bin directly through an <img> tag, producing a cross-origin request.
  2. Load the same underlying resource through a same-origin URL under /proxy, where the Service Worker fetches http://localhost:9000/target.bin with mode: "no-cors" and returns the response.

After each load, the page reads performance.getEntriesByType("resource") and logs responseStart, responseEnd, transferSize, encodedBodySize, decodedBodySize and nextHopProtocol for the matching PerformanceResourceTiming entry.

Finding it

The renderer-side subresource loader treats responses constructed by a Service Worker as always same-origin with the client. In ServiceWorkerSubresourceLoader::StartResponse, the URL loader head is filled from the Service Worker FetchAPIResponse, and then timing_allow_passed is set to true for every constructed subresource response, regardless of the actual response origin or any TAO headers.

This looked wrong because the normal network loader path computes the same flag from an explicit timing-allow-origin check. The flag is what Blink uses to decide whether detailed timing and connection metadata may be exposed to JavaScript, so forcing it to true bypasses the cross-origin restriction that the Resource Timing API is supposed to enforce.

Exploitation

Step 1: Register the Service Worker and prepare the two load paths

The page at http://localhost:8080/index.html registers a Service Worker whose scope covers /proxy. The page can then either request http://localhost:9000/target.bin directly through an <img> tag, or request a same-origin URL under /proxy that the Service Worker handles.

Step 2: Load the resource directly cross-origin

The direct <img> load from http://localhost:8080 to http://localhost:9000/target.bin produces a timing entry with the sensitive fields cleared or zeroed, as expected for a cross-origin resource without TAO:

  • responseStart: 0
  • transferSize: 0
  • encodedBodySize: 0
  • decodedBodySize: 0
  • nextHopProtocol: ""

Step 3: Load the same resource through the Service Worker

The Service Worker fetches http://localhost:9000/target.bin with mode: "no-cors" and returns the response for a same-origin URL such as http://localhost:8080/proxy?.... The observable resource name is therefore same-origin, while the underlying fetch is cross-origin. For this entry the logged timing data includes detailed values:

  • non-zero responseStart and responseEnd
  • transferSize and nextHopProtocol populated

Step 4: Compare the two entries

The comparison shows that code running in the origin that controls the Service Worker can obtain detailed timing and size information about a resource whose actual origin is different and that does not opt in via Timing-Allow-Origin. The same-origin /proxy URL is only the name the page sees; the data describes the cross-origin fetch the Service Worker performed.

Root cause

In ServiceWorkerSubresourceLoader::StartResponse, the response head is populated from the Service Worker FetchAPIResponse and then marked as having passed the timing allow check unconditionally:

C++
// chromium/src/content/renderer/service_worker/service_worker_subresource_loader.cc
void ServiceWorkerSubresourceLoader::StartResponse(
    blink::mojom::FetchAPIResponsePtr response,
    blink::mojom::ServiceWorkerStreamHandlePtr body_as_stream) {
  // ...
  blink::ServiceWorkerLoaderHelpers::SaveResponseInfo(*response,
                                                      response_head_.get());
  response_head_->response_start = base::TimeTicks::Now();
  response_head_->load_timing.receive_headers_start = base::TimeTicks::Now();
  response_head_->load_timing.receive_headers_end =
      response_head_->load_timing.receive_headers_start;
  response_source_ = response->response_source;

  // Constructed subresource responses are always same-origin as the requesting
  // client.
  response_head_->timing_allow_passed = true;
  // ...
}

The comment states the assumption behind the assignment: constructed subresource responses are treated as always same-origin as the requesting client. The normal network loader path does not make that assumption; it computes the flag from an explicit check:

C++
// chromium/src/services/network/cors/cors_url_loader.cc
// (simplified)
timing_allow_failed_flag_ = !PassesTimingAllowOriginCheck(*response_head);
response_head->timing_allow_passed = !timing_allow_failed_flag_;

On the Blink side, timing_allow_passed directly controls whether detailed timing and connection metadata are exposed. In CreateResourceTimingInfo, when TimingAllowPassed() is true, allow_timing_details is set and the full set of fields is populated:

C++
// chromium/src/third_party/blink/renderer/platform/loader/fetch/resource_timing_utils.cc
mojom::blink::ResourceTimingInfoPtr CreateResourceTimingInfo(
    base::TimeTicks start_time,
    const KURL& initial_url,
    const ResourceResponse* response) {
  mojom::blink::ResourceTimingInfoPtr info =
      mojom::blink::ResourceTimingInfo::New();
  info->start_time = start_time;
  info->name = initial_url;
  info->response_end = base::TimeTicks::Now();
  if (!response) {
    return info;
  }

  if (response->TimingAllowPassed()) {
    info->allow_timing_details = true;
    info->server_timing = ParseServerTimingFromHeaderValueToMojo(
        response->HttpHeaderField(http_names::kServerTiming));
    info->cache_state = response->CacheState();
    info->alpn_negotiated_protocol = response->AlpnNegotiatedProtocol().IsNull()
                                         ? g_empty_string
                                         : response->AlpnNegotiatedProtocol();
    info->connection_info = response->ConnectionInfoString().IsNull()
                                ? g_empty_string
                                : response->ConnectionInfoString();

    info->did_reuse_connection = response->ConnectionReused();
    // Use SecurityOrigin::Create to handle cases like blob:https://.
    info->is_secure_transport = base::Contains(
        url::GetSecureSchemes(),
        SecurityOrigin::Create(response->ResponseUrl())->Protocol().Ascii());
    info->timing = response->GetResourceLoadTiming()
                       ? response->GetResourceLoadTiming()->ToMojo()
                       : nullptr;
  } else {
    // Only limited timing fields are exposed when the timing allow check fails.
    // ...
  }
  // ...
}

The assumption in the Service Worker loader is unsound because the response URL may differ from the request URL. ResourceResponse documents this directly:

C++
// chromium/src/third_party/blink/renderer/platform/loader/fetch/resource_response.h
// ...
// Specifically, if a service worker responded to the request for this
// resource, it may have fetched an entirely different URL and responded with
// that resource. WasFetchedViaServiceWorker() and ResponseUrl() can be used
// to determine whether and how a service worker responded to the request.
// Example service worker code:
//
// onfetch = (event => {
//   if (event.request.url == 'https://abc.com')
//     event.respondWith(fetch('https://def.com'));
// });
//
// If this service worker responds to an "https://abc.com" request, then for
// the resulting ResourceResponse, CurrentRequestUrl() is "https://abc.com",
// WasFetchedViaServiceWorker() is true, and ResponseUrl() is
// "https://def.com".
const KURL& CurrentRequestUrl() const;
void SetCurrentRequestUrl(const KURL&);
// ...
KURL ResponseUrl() const;

So the request URL being same-origin says nothing about the origin of the resource that was actually fetched. The timing allow check that normally protects cross-origin resources is never applied to the constructed response, and the flag that gates the detailed fields is set to true by default.

Impact

Any web origin that can register and control a Service Worker for its own pages can exploit the issue for subresource requests it initiates, for example an attacker-controlled site with a Service Worker whose scope covers a /proxy path.

The attacking origin can obtain detailed timing and connection metadata, such as non-zero responseStart and responseEnd, transferSize, encodedBodySize, decodedBodySize and nextHopProtocol, for resources that are actually fetched from a different origin and would normally have these fields restricted by the Resource Timing API. According to the report, this additional information can be used to:

  • perform cross-site performance and availability probing of arbitrary URLs reachable from the browser;
  • infer limited aspects of user or server state from response timing and size patterns, for example the presence of particular resources or cache behaviour;
  • strengthen cross-origin device or network fingerprinting by incorporating timing and protocol characteristics of external resources.

The platform records the severity as medium and the bounty as 2000.00 USD.

Fix

The report describes the defect and the code paths involved but does not state which change was made. The report does not state which change was made.

  • Other response-construction paths. Look for any loader that builds a response head from a stored or synthesised response (caches, prefetch, signed exchanges, navigation preload) and sets timing or CORS-related flags by assumption rather than by checking the response. A positive result is a PerformanceResourceTiming entry with non-zero transferSize or populated nextHopProtocol for a cross-origin resource without TAO.
  • Redirects and ResponseUrl() differences. Have a Service Worker respond with a fetch that follows redirects to a different origin, then inspect the timing entry. A positive result is detailed timing attributed to the final cross-origin URL.
  • no-cors versus cors modes. Repeat the proxy pattern with both modes and with opaque responses. A positive result is detailed fields appearing where the mode would normally restrict them.
  • Cache and connection reuse signals. Compare did_reuse_connection and cache state across repeated loads through the proxy. A positive result is a stable signal about the cross-origin server's connection or cache behaviour that is not available on the direct cross-origin load.
  • Other timing-gated fields. Check server_timing, connection_info and alpn_negotiated_protocol in the same setup. A positive result is any of these being populated for a cross-origin resource that does not send Timing-Allow-Origin.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 17 min read.

What happened, in plain words

A web page can ask the browser how long it took to download each image, script or other file it uses. That feature is called the Resource Timing API. It is meant to be careful: if a file comes from a different website, the browser hides most of the details, so one site cannot quietly measure another site's servers. The report describes a way around that protection. When a Service Worker (a small script a site installs in the browser to handle its network requests) fetches a file from another site and hands it back, Chrome marks the result as if it were the site's own file. The detailed timing and size numbers are then shown to the page, even though the file really came from somewhere else and never agreed to share that information. The report describes a test page, and the issue was reported through Chrome's bug bounty programme.

Context

The product and the feature

Chrome is a web browser. Every page it loads is made of many separate files: the HTML document itself, images, stylesheets, scripts. Each of those files is called a resource. When the browser downloads a resource, it knows a lot about what happened: when the request started, when the first byte of the response arrived, how many bytes were transferred, which network protocol was used, and so on.

The Resource Timing API is a feature that lets a page ask the browser for those measurements. "API" stands for Application Programming Interface: a defined set of functions a program can call to get something done. Here the page calls a JavaScript function and receives a list of timing records, one per resource. Web developers use this to find out why their site is slow.

Why the feature has a privacy guard

Imagine two websites: yours, and a bank. If your page could measure exactly how long the bank's server takes to answer, and how many bytes it sends, you could learn things about the bank's infrastructure, or about whether a particular user is logged in there. That is why the API has a rule. Detailed numbers are only given out when one of two things is true:

  1. The resource is same-origin as the page asking. "Origin" means the combination of protocol, host and port, for example http://localhost:8080. Two resources with the same origin are considered to belong to the same site, so sharing details between them is fine.
  2. The resource is cross-origin (a different origin) but its server explicitly agrees to share. It does so by sending a response header called Timing-Allow-Origin, or TAO. A header is a small piece of metadata the server sends alongside the content. Sending Timing-Allow-Origin is like a shop putting up a sign saying "yes, you may measure us".

If neither condition holds, the browser blanks out the sensitive fields. The page still sees that the resource loaded, but not the fine detail.

What a Service Worker is

A Service Worker is a script that a website installs into the browser. Once installed, it sits between the page and the network. Whenever the page requests a resource, the Service Worker can step in and answer the request itself, for example by fetching something from a different address and returning that instead. This is how websites work offline or speed themselves up. The area of pages a Service Worker is allowed to handle is called its scope.

The report is about what happens when a Service Worker answers a request with a resource it fetched from a different origin. The page asked for a same-origin address, but the bytes actually came from elsewhere.

The report itself

The issue was reported through the Chrome Vulnerability Reward Program (Chrome VRP), a scheme that pays people for finding security bugs in Chrome. The report was filed against the Chromium source repository, which is the public codebase Chrome is built from. The researcher is credited as Povcfe of Tencent Security Xuanwu Lab. The weakness is classified as side-channel information leakage: "side channel" means information that leaks not through the intended output of a system but through a by-product, here timing and size measurements. The issue was found in Chrome 145.0.7632.1/stable. It does not involve a crash.

Setup

The researcher built a small test site with two separate origins, both running on the same computer:

  • http://localhost:8080, which serves index.html and registers a Service Worker whose scope covers /proxy.
  • http://localhost:9000, which serves target.bin, the cross-origin resource of interest.

localhost means "this computer". The two different port numbers, 8080 and 9000, make them two different origins as far as the browser is concerned, exactly as if they were two unrelated websites on the internet.

The test page offers two actions:

  1. Load http://localhost:9000/target.bin directly through an <img> tag. An <img> tag is the HTML element that displays a picture; pointing it at a URL makes the browser download that file. Because the page lives on port 8080 and the file lives on port 9000, this is a cross-origin request.
  2. Load the same underlying resource through a same-origin URL under /proxy. Here the Service Worker fetches http://localhost:9000/target.bin with mode: "no-cors" and returns the response. mode: "no-cors" is an instruction to the browser to make a simple request without asking the other server for permission to read the response in detail; the page gets an opaque response, meaning it cannot inspect the contents, but it can still use it, for example as an image.

After each load, the page reads performance.getEntriesByType("resource") and logs six fields for the matching PerformanceResourceTiming entry: responseStart, responseEnd, transferSize, encodedBodySize, decodedBodySize and nextHopProtocol. In plain words, it asks the browser for its measurement records and prints the interesting numbers.

Finding it

The part of Chrome that handles Service Worker responses, called the renderer-side subresource loader, treats every response a Service Worker constructs as if it were same-origin with the page. In a function called ServiceWorkerSubresourceLoader::StartResponse, the response details are copied over from the Service Worker's response object, and then a flag named timing_allow_passed is set to true for every constructed subresource response, regardless of the actual response origin or any TAO headers.

This looked wrong because the normal network loader path computes the same flag from an explicit timing-allow-origin check. The flag is what Blink (Chrome's rendering engine, the part that turns web code into what you see) uses to decide whether detailed timing and connection metadata may be exposed to JavaScript. Forcing it to true bypasses the cross-origin restriction that the Resource Timing API is supposed to enforce.

Exploitation

Step 1: Register the Service Worker and prepare the two load paths

The page at http://localhost:8080/index.html registers a Service Worker whose scope covers /proxy. The page can then either request http://localhost:9000/target.bin directly through an <img> tag, or request a same-origin URL under /proxy that the Service Worker handles.

Why this step matters: the two paths are the experiment's control and its test. The direct path shows what the browser normally reveals about a cross-origin file. The proxy path shows what it reveals when a Service Worker is in the middle. Comparing them is the whole point.

Step 2: Load the resource directly cross-origin

The direct <img> load from http://localhost:8080 to http://localhost:9000/target.bin produces a timing entry with the sensitive fields cleared or zeroed, as expected for a cross-origin resource without TAO:

  • responseStart: 0
  • transferSize: 0
  • encodedBodySize: 0
  • decodedBodySize: 0
  • nextHopProtocol: ""

What each field means:

  • responseStart: the moment the first byte of the response arrived. Zero means "not disclosed".
  • transferSize: how many bytes crossed the network for this resource, including headers. Zero means "not disclosed".
  • encodedBodySize: the size of the body as it was sent over the network, before decompression. Zero means "not disclosed".
  • decodedBodySize: the size of the body after decompression, as the page receives it. Zero means "not disclosed".
  • nextHopProtocol: which network protocol carried the response, for example HTTP/2 or HTTP/3. An empty string means "not disclosed".

This is the browser doing its job: the file is cross-origin and its server never sent Timing-Allow-Origin, so the page is told nothing useful.

Step 3: Load the same resource through the Service Worker

The Service Worker fetches http://localhost:9000/target.bin with mode: "no-cors" and returns the response for a same-origin URL such as http://localhost:8080/proxy?.... The observable resource name is therefore same-origin, while the underlying fetch is cross-origin. For this entry the logged timing data includes detailed values:

  • non-zero responseStart and responseEnd
  • transferSize and nextHopProtocol populated

Why this is the bug: the page asked for an address on its own origin, so the browser's rule says "same-origin, share everything". But the bytes were actually fetched from port 9000, a different origin that never opted in. The page now has real measurements of that other server's behaviour.

Step 4: Compare the two entries

The comparison shows that code running in the origin that controls the Service Worker can obtain detailed timing and size information about a resource whose actual origin is different and that does not opt in via Timing-Allow-Origin. The same-origin /proxy URL is only the name the page sees; the data describes the cross-origin fetch the Service Worker performed.

Root cause

In ServiceWorkerSubresourceLoader::StartResponse, the response head is populated from the Service Worker FetchAPIResponse and then marked as having passed the timing allow check unconditionally:

C++
// chromium/src/content/renderer/service_worker/service_worker_subresource_loader.cc
void ServiceWorkerSubresourceLoader::StartResponse(
    blink::mojom::FetchAPIResponsePtr response,
    blink::mojom::ServiceWorkerStreamHandlePtr body_as_stream) {
  // ...
  blink::ServiceWorkerLoaderHelpers::SaveResponseInfo(*response,
                                                      response_head_.get());
  response_head_->response_start = base::TimeTicks::Now();
  response_head_->load_timing.receive_headers_start = base::TimeTicks::Now();
  response_head_->load_timing.receive_headers_end =
      response_head_->load_timing.receive_headers_start;
  response_source_ = response->response_source;

  // Constructed subresource responses are always same-origin as the requesting
  // client.
  response_head_->timing_allow_passed = true;
  // ...
}

Line by line:

  • The first line is a comment giving the file path inside the Chromium source tree, so a reader can find the code.
  • void ServiceWorkerSubresourceLoader::StartResponse( begins the definition of a function named StartResponse that belongs to a class called ServiceWorkerSubresourceLoader. void means it returns nothing. This is the function that runs when a Service Worker's answer is about to be handed to the page.
  • The next two lines are the function's parameters: a response object holding what the Service Worker returned, and a body_as_stream handle for the body data. The // ... marks code that has been left out for brevity.
  • SaveResponseInfo copies the basic information from the Service Worker response into an internal structure called response_head_, which is the browser's working record of this response.
  • The next three lines record timestamps: response_start is set to the current time, and the start and end of header reception are both set to that same moment. In other words, the browser treats the response as having arrived instantly, because the Service Worker produced it locally rather than waiting on a network.
  • response_source_ = response->response_source; copies a label saying where the response came from.
  • The comment // Constructed subresource responses are always same-origin as the requesting client. states the assumption behind the next line: that anything a Service Worker builds is automatically the page's own.
  • response_head_->timing_allow_passed = true; is the defect. It sets the "this resource passed the timing allow check" flag to true for every such response, without checking anything.

The comment states the assumption behind the assignment: constructed subresource responses are treated as always same-origin as the requesting client. The normal network loader path does not make that assumption; it computes the flag from an explicit check:

C++
// chromium/src/services/network/cors/cors_url_loader.cc
// (simplified)
timing_allow_failed_flag_ = !PassesTimingAllowOriginCheck(*response_head);
response_head->timing_allow_passed = !timing_allow_failed_flag_;

Line by line:

  • The first line names the file, and the second says the snippet has been simplified for readability.
  • PassesTimingAllowOriginCheck(*response_head) is a function that looks at the response and decides whether it is allowed to share timing details, based on origin and the Timing-Allow-Origin header.
  • The ! in front means "not". So timing_allow_failed_flag_ becomes true when the check fails.
  • The last line sets timing_allow_passed to the opposite of the failure flag, so it is true only when the check actually passed.

That is the correct behaviour: look at the response, then decide. The Service Worker path skips the looking and just decides.

On the Blink side, timing_allow_passed directly controls whether detailed timing and connection metadata are exposed. In CreateResourceTimingInfo, when TimingAllowPassed() is true, allow_timing_details is set and the full set of fields is populated:

C++
// chromium/src/third_party/blink/renderer/platform/loader/fetch/resource_timing_utils.cc
mojom::blink::ResourceTimingInfoPtr CreateResourceTimingInfo(
    base::TimeTicks start_time,
    const KURL& initial_url,
    const ResourceResponse* response) {
  mojom::blink::ResourceTimingInfoPtr info =
      mojom::blink::ResourceTimingInfo::New();
  info->start_time = start_time;
  info->name = initial_url;
  info->response_end = base::TimeTicks::Now();
  if (!response) {
    return info;
  }

  if (response->TimingAllowPassed()) {
    info->allow_timing_details = true;
    info->server_timing = ParseServerTimingFromHeaderValueToMojo(
        response->HttpHeaderField(http_names::kServerTiming));
    info->cache_state = response->CacheState();
    info->alpn_negotiated_protocol = response->AlpnNegotiatedProtocol().IsNull()
                                         ? g_empty_string
                                         : response->AlpnNegotiatedProtocol();
    info->connection_info = response->ConnectionInfoString().IsNull()
                                ? g_empty_string
                                : response->ConnectionInfoString();

    info->did_reuse_connection = response->ConnectionReused();
    // Use SecurityOrigin::Create to handle cases like blob:https://.
    info->is_secure_transport = base::Contains(
        url::GetSecureSchemes(),
        SecurityOrigin::Create(response->ResponseUrl())->Protocol().Ascii());
    info->timing = response->GetResourceLoadTiming()
                       ? response->GetResourceLoadTiming()->ToMojo()
                       : nullptr;
  } else {
    // Only limited timing fields are exposed when the timing allow check fails.
    // ...
  }
  // ...
}

Line by line:

  • The comment names the source file.
  • CreateResourceTimingInfo is the function that builds the record the page will eventually see. It takes a start time, the URL the page asked for, and the response object.
  • ResourceTimingInfo::New() creates an empty record. The next three lines fill in the start time, the resource name and the end time.
  • if (!response) handles the case where there is no response at all; it returns the partial record.
  • if (response->TimingAllowPassed()) is the gate. Everything inside this block only happens when the flag is true.
  • info->allow_timing_details = true; tells the rest of the system that full detail may be shared.
  • The following lines copy the detailed fields: server_timing (timing hints the server sent in a Server-Timing header), cache_state (whether the response came from cache), alpn_negotiated_protocol (the protocol agreed during connection setup), connection_info (details about the network connection), did_reuse_connection (whether an existing connection was reused), is_secure_transport (whether the transport was secure) and timing (the full set of timing marks). The IsNull() ? g_empty_string : ... pattern means "if the value is missing, use an empty string, otherwise use the value".
  • The else branch is where the limited fields are exposed when the check fails. The // ... marks the omitted code.

The assumption in the Service Worker loader is unsound because the response URL may differ from the request URL. ResourceResponse documents this directly:

C++
// chromium/src/third_party/blink/renderer/platform/loader/fetch/resource_response.h
// ...
// Specifically, if a service worker responded to the request for this
// resource, it may have fetched an entirely different URL and responded with
// that resource. WasFetchedViaServiceWorker() and ResponseUrl() can be used
// to determine whether and how a service worker responded to the request.
// Example service worker code:
//
// onfetch = (event => {
//   if (event.request.url == 'https://abc.com')
//     event.respondWith(fetch('https://def.com'));
// });
//
// If this service worker responds to an "https://abc.com" request, then for
// the resulting ResourceResponse, CurrentRequestUrl() is "https://abc.com",
// WasFetchedViaServiceWorker() is true, and ResponseUrl() is
// "https://def.com".
const KURL& CurrentRequestUrl() const;
void SetCurrentRequestUrl(const KURL&);
// ...
KURL ResponseUrl() const;

Line by line:

  • The first line names the header file. The following comment lines explain the situation in prose.
  • The comment says that when a Service Worker answers a request, it may have fetched an entirely different URL and returned that resource instead.
  • It points to two functions that reveal what happened: WasFetchedViaServiceWorker() and ResponseUrl().
  • The example code shows a Service Worker that listens for fetch events. onfetch is the handler. When the requested URL is https://abc.com, it calls event.respondWith(fetch('https://def.com')), meaning "answer this request with whatever https://def.com returns".
  • The comment then spells out the consequence: the request URL is https://abc.com, the response came via a Service Worker, and the response URL is https://def.com.
  • The last lines declare the functions: CurrentRequestUrl() returns the URL that was asked for, SetCurrentRequestUrl sets it, and ResponseUrl() returns the URL the response actually came from.

So the request URL being same-origin says nothing about the origin of the resource that was actually fetched. The timing allow check that normally protects cross-origin resources is never applied to the constructed response, and the flag that gates the detailed fields is set to true by default.

Impact

Any web origin that can register and control a Service Worker for its own pages can exploit the issue for subresource requests it initiates, for example an attacker-controlled site with a Service Worker whose scope covers a /proxy path.

The attacking origin can obtain detailed timing and connection metadata, such as non-zero responseStart and responseEnd, transferSize, encodedBodySize, decodedBodySize and nextHopProtocol, for resources that are actually fetched from a different origin and would normally have these fields restricted by the Resource Timing API. According to the report, this additional information can be used to:

  • perform cross-site performance and availability probing of arbitrary URLs reachable from the browser;
  • infer limited aspects of user or server state from response timing and size patterns, for example the presence of particular resources or cache behaviour;
  • strengthen cross-origin device or network fingerprinting by incorporating timing and protocol characteristics of external resources.

In everyday terms: a site could quietly time other sites' servers, notice whether certain files exist or are cached, and add those measurements to the profile it builds about a visitor's device and network. Fingerprinting means identifying a visitor by the combination of characteristics their browser and network reveal, without using a cookie or login.

The platform records the severity as medium and the bounty as 2000.00 USD.

Fix

The report describes the defect and the code paths involved but does not state which change was made. The report does not state which change was made.

These are other places a similar mistake might hide, and how to recognise a hit:

  • Other response-construction paths. Look for any loader that builds a response head from a stored or synthesised response (caches, prefetch, signed exchanges, navigation preload) and sets timing or CORS-related flags by assumption rather than by checking the response. A positive result is a PerformanceResourceTiming entry with non-zero transferSize or populated nextHopProtocol for a cross-origin resource without TAO.
  • Redirects and ResponseUrl() differences. Have a Service Worker respond with a fetch that follows redirects to a different origin, then inspect the timing entry. A positive result is detailed timing attributed to the final cross-origin URL.
  • no-cors versus cors modes. Repeat the proxy pattern with both modes and with opaque responses. A positive result is detailed fields appearing where the mode would normally restrict them.
  • Cache and connection reuse signals. Compare did_reuse_connection and cache state across repeated loads through the proxy. A positive result is a stable signal about the cross-origin server's connection or cache behaviour that is not available on the direct cross-origin load.
  • Other timing-gated fields. Check server_timing, connection_info and alpn_negotiated_protocol in the same setup. A positive result is any of these being populated for a cross-origin resource that does not send Timing-Allow-Origin.

Glossary

  • API: a defined set of functions a program can call to get something done, like a menu of services.
  • Blink: Chrome's rendering engine, the part that turns HTML, CSS and JavaScript into what you see.
  • Bug bounty: a programme that pays people for responsibly reporting security bugs.
  • Cache: a local store of previously downloaded files, used to avoid downloading them again.
  • Chrome VRP: the Chrome Vulnerability Reward Program, Google's bug bounty scheme for Chrome.
  • Chromium: the open-source codebase from which Chrome is built.
  • CORS: Cross-Origin Resource Sharing, the set of browser rules that decide when a page may read a response from another origin.
  • Cross-origin: belonging to a different origin (protocol, host and port) than the page making the request.
  • Fingerprinting: identifying a visitor from the combination of characteristics their browser and network reveal, without cookies or login.
  • Flag: a true/false value in code that records a decision or state.
  • Header: a small piece of metadata sent alongside a web response, such as a content type or a permission.
  • Information leak: a bug where data that should stay hidden becomes visible to someone who should not see it.
  • localhost: the name a computer uses to refer to itself.
  • mode: "no-cors": an instruction to make a simple cross-origin request without asking the other server for permission to read the response in detail; the result is an opaque response.
  • Opaque response: a response the page cannot inspect, but can still use, for example as an image.
  • Origin: the combination of protocol, host and port, for example http://localhost:8080.
  • PerformanceResourceTiming: the object type that holds the timing record for one resource.
  • Port: a number that identifies a specific service on a computer; different ports count as different origins.
  • Renderer: the part of the browser that runs web page code, kept separate from the rest for safety.
  • Resource: any file a page loads, such as an image, script or stylesheet.
  • Resource Timing API: the browser feature that lets a page read timing and size measurements for the resources it loaded.
  • Same-origin: sharing the same protocol, host and port as the page making the request.
  • Scope: the set of pages and paths a Service Worker is allowed to handle.
  • Service Worker: a script a site installs in the browser that can intercept and answer the page's network requests.
  • Side channel: information that leaks through a by-product of a system, such as timing or size, rather than through its intended output.
  • Side-channel information leakage: a vulnerability class where such by-product information reveals something it should not.
  • TAO (Timing-Allow-Origin): a response header by which a server explicitly allows other origins to see detailed timing information about its resources.
  • Timing allow check: the browser's test of whether a response is same-origin or carries TAO, deciding whether detailed timing may be shared.
  • timing_allow_passed: the internal flag recording the result of that check.
  • Transfer size: the number of bytes that crossed the network for a resource, including headers.

More by Povcfe

View all

6 more disclosed reports, best first.

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.