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

Incorrect authorization in PerformanceAPIs (CVE-2026-113289)

The JS Self-Profiling API checks the initial request URL rather than the final response URL when deciding whether to include stack frames from a script. An attacker could use a same-origin redirect to a cross-origin script and obtain execution metadata such as function names and line numbers, enabling a cross-site leak.

Google Chrome

Originally disclosed on Chrome VRP

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

Overview: The JS Self-Profiling API may leak execution metadata (like function names and line numbers) from opaque cross-origin scripts when loaded via a same-origin redirect. The vulnerability stems from the profiler's origin-validation logic checking the initial request URL rather than the final response URL. This could allow an attacker to infer sensitive cross-origin user states.

Affected files:

  • third_party/blink/renderer/bindings/core/v8/profiler_trace_builder.cc
  • third_party/blink/renderer/core/script/classic_script.cc
  • third_party/blink/renderer/platform/loader/fetch/resource.cc
  • third_party/blink/renderer/core/timing/profiler_group.cc

Estimated timestamp from git blame: 2022-08-17

Summary

A potential vulnerability in the JS Self-Profiling API allows an attacker to bypass cross-origin isolation checks for opaque scripts. By initiating a same-origin request that redirects to a cross-origin script, an attacker can trick the profiler into including stack frames from the cross-origin script in its output. This leaks sensitive information such as function names and line numbers, enabling a Cross-Site Leak (XS-Leak).

Root Cause Analysis

When a script is fetched, Blink creates a Resource object to manage the network request. If the server responds with an HTTP redirect, Resource::WillFollowRedirect handles the redirect but does not mutate its internal resource_request_ object, which retains the initial request URL.

After the script is downloaded, Blink calls ClassicScript::CreateFromResource (third_party/blink/renderer/core/script/classic_script.cc). It initializes source_url using resource->Url(), which returns the unmodified initial request URL. This initial, pre-redirect URL is then passed to V8 via v8::ScriptOrigin during script compilation.

When a Profiler is active, the V8 CPU profiler records executing stack frames and associates them with this source_url. Later, when the profiler is stopped, ProfilerTraceBuilder::ShouldIncludeStackFrame (third_party/blink/renderer/bindings/core/v8/profiler_trace_builder.cc) filters the frames to enforce cross-origin protections. It checks if the frame's origin matches the document's origin:

C++
KURL resource_url(resource_node->GetScriptResourceNameStr());
auto origin = SecurityOrigin::Create(resource_url);
bool allowed = resource_node->IsScriptSharedCrossOrigin() ||
               origin->IsSameOriginWith(allowed_origin_);

Because resource_url reflects the initial same-origin request URL, origin->IsSameOriginWith(allowed_origin_) evaluates to true. This causes the check to pass, bypassing the fact that IsScriptSharedCrossOrigin() evaluates to false for the opaque response. The profiler then improperly includes the cross-origin metadata in the resulting web-exposed trace.

Potential Attack Scenario

Note: The following steps are a suggested theoretical attack flow based on static analysis, as our tooling agent currently lacks the ability to run code and provide a working proof-of-concept.

  1. An attacker serves a webpage on their origin (e.g., https://attacker.example) with the Document-Policy: js-profiling header to enable the API.
  2. The attacker hosts a redirect endpoint at https://attacker.example/redirect that returns an HTTP 302 Found pointing to a sensitive cross-origin script (e.g., https://victim.example/app.js).
  3. The attacker's webpage executes const p = new Profiler({sampleInterval: 0, maxBufferSize: 10000});.
  4. The attacker's webpage forces a load of the redirect endpoint by appending a <script src="/redirect"></script> tag to the DOM.
  5. The browser fetches the initial URL, follows the redirect, and executes the cross-origin script. V8 profiles the execution.
  6. The attacker calls await p.stop() to retrieve the trace.
  7. The ProfilerTraceBuilder incorrectly validates the script against the pre-redirect https://attacker.example/redirect URL. The attacker receives a trace containing the execution paths of the credentialed victim script, which can be analyzed to infer the user's state.

Suggested Fix

To fix this issue, ProfilerTraceBuilder::ShouldIncludeStackFrame must not rely on a same-origin check against the resource_name string for scripts that underwent a cross-origin redirect.

One potential solution is to modify ClassicScript::CreateScriptOrigin to pass the final response URL (resource->GetResponse().ResponseUrl()) to V8, or to pass a separate, reliable flag that dictates cross-origin opacity to the trace builder. Alternatively, ShouldIncludeStackFrame could be restricted to rely exclusively on IsScriptSharedCrossOrigin() for all external scripts.

Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955


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. 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 profiler's origin check uses the pre-redirect request URL stored in the script resource instead of the final response URL, so a same-origin redirect makes a cross-origin script appear same-origin.

Impact

An attacker could obtain a profiling trace containing execution paths of a cross-origin script, which may be analysed to infer the user's state, though the report notes this is a theoretical attack without a working proof-of-concept.

What the attacker needed

Attacker-controlled webpage; victim visits attacker's page; cross-origin script accessible

The fix

The fix should ensure the profiler uses the final response URL or a reliable cross-origin opacity flag when deciding whether to include stack frames.

How it was found

  1. Attacker serves a page with the Document-Policy: js-profiling header to enable the API.
  2. Attacker hosts a redirect endpoint that returns a 302 to a sensitive cross-origin script.
  3. Attacker's page creates a Profiler object.
  4. Attacker's page loads the redirect endpoint via a script tag.
  5. Browser follows the redirect, executes the cross-origin script, and V8 profiles it.
  6. Attacker calls stop() to retrieve the trace, which includes cross-origin metadata.

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.

A browser feature that profiles JavaScript execution was supposed to hide details about scripts from other websites. Because it checked the wrong address after a redirect, it could reveal private information about those scripts. This could let a malicious site learn things about a user's activity on another site.

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.