Incorrect authorization in PerformanceAPIs (CVE-2026-113146)
The JS Self-Profiling API hardcodes cross-origin isolation to true, causing it to expose 5μs-resolution timestamps even on non-isolated pages where timers should be clamped to 100μs. An attacker could use these fine-grained timestamps to build a high-resolution timer and mount side-channel attacks such as Spectre.
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 bypasses the 100μs timer coarsening defense intended for non-cross-origin-isolated pages. It exposes 5μs-resolution timestamps because the ProfilerTraceBuilder hardcodes the cross-origin isolation capability to true. This potentially allows an attacker to reconstruct a high-resolution timer to mount side-channel attacks like Spectre.
Affected files:
third_party/blink/renderer/bindings/core/v8/profiler_trace_builder.ccthird_party/blink/renderer/core/timing/profiler_sample.idl
Estimated timestamp from git blame: 2021-03-23
Summary
The JS Self-Profiling API (v8-profiler) leaks high-resolution timestamps (5μs resolution) to web pages that are not cross-origin isolated. In non-isolated contexts, Chrome is intended to clamp high-resolution timers to a coarse resolution of 100μs as a defense-in-depth measure against transient execution side-channel attacks like Spectre.
The profiling API bypasses this mitigation by hardcoding a flag that enables fine-grained timing (5μs resolution) during trace generation. Because the API can be enabled simply via the Document-Policy: js-profiling HTTP header—which does not require Cross-Origin Opener Policy (COOP) or Cross-Origin Embedder Policy (COEP)—an attacker can obtain a stream of 5μs-granular timestamps in a context where performance.now() is correctly clamped to 100μs.
Root Cause Analysis
The vulnerability originates in third_party/blink/renderer/bindings/core/v8/profiler_trace_builder.cc. When V8 CPU profile samples are converted into a web-exposed ProfilerTrace, the conversion of the raw base::TimeTicks timestamp to a DOMHighResTimeStamp is performed by calling Performance::MonotonicTimeToDOMHighResTimeStamp.
In ProfilerTraceBuilder::AddSample:
void ProfilerTraceBuilder::AddSample(
const v8::CpuProfileNode* node,
base::TimeTicks timestamp,
const v8::StateTag state,
const v8::EmbedderStateTag embedder_state) {
auto* sample = ProfilerSample::Create();
// TODO(yoav): This should not use MonotonicTimeToDOMHighResTimeStamp, as
// these timestamps are clamped, which makes no sense for traces. Since this
// only exposes time to traces, it's fine to define this as statically "cross
// origin isolated".
auto relative_timestamp = Performance::MonotonicTimeToDOMHighResTimeStamp(
time_origin_, timestamp, /*allow_negative_value=*/true,
/*cross_origin_isolated_capability=*/true);
// ...
}
As the comment notes, the cross_origin_isolated_capability parameter is hardcoded to true. This boolean is passed down to TimeClamper::ClampTimeResolution (third_party/blink/renderer/core/timing/time_clamper.cc), which then uses it to determine the clamping resolution:
int resolution = cross_origin_isolated_capability
? kFineResolutionMicroseconds
: kCoarseResolutionMicroseconds;
Consequently, the clamper selects kFineResolutionMicroseconds (5μs) instead of the kCoarseResolutionMicroseconds (100μs) that should apply to a non-cross-origin-isolated page. The trace containing these precisely timed samples is then returned to the page's JavaScript via the Promise resolution of profiler.stop().
Security Impact
While CPU samples are collected at discrete intervals (typically >= 10ms), the high-resolution timestamps attached to those samples allow an attacker to calibrate a JavaScript busy-loop counter with significantly higher precision than standard non-isolated timers permit.
By building a tightly calibrated busy loop, the attacker effectively restores a high-resolution timing mechanism in the non-isolated page. This represents a bypass of a side-channel defense-in-depth mitigation. The attacker could potentially use this capability to conduct cache-timing attacks (such as Spectre) to read sensitive cross-origin data residing within the same renderer process.
Potential Reproduction Steps
(Note: These are theoretical steps derived from code analysis)
-
Serve an HTML page over HTTPS with the HTTP header
Document-Policy: js-profiling. -
Ensure the page is not cross-origin isolated (do not send COOP/COEP headers, and verify
window.crossOriginIsolated === false). -
In the page script, instantiate a profiler:
JavaScript const p = new Profiler({sampleInterval: 10, maxBufferSize: 10000}); -
Execute a busy loop for approximately one second to generate CPU samples.
-
Stop the profiler and retrieve the trace data:
JavaScript const trace = await p.stop(); -
Inspect
trace.samples[i].timestamp. Observe that the values are quantized to 0.005 ms (5μs) increments. -
Verify that standard timers in the same context, like
performance.now(), are correctly clamped to 0.1 ms (100μs) increments.
Suggested Fix
Instead of hardcoding the cross_origin_isolated_capability to true in ProfilerTraceBuilder, the actual isolation state of the execution context should be plumbed through.
- Modify the
ProfilerTraceBuilderconstructor (andFromProfile) to accept a boolean representing thecross_origin_isolated_capability. - In
ProfilerGroup::StopProfiler(whereProfilerTraceBuilder::FromProfileis called), query the execution context orPerformanceobject to determine the actualcrossOriginIsolatedstate. - Pass this real state to the
ProfilerTraceBuilderso it correctly clamps the sample timestamps to 100μs in non-isolated contexts.
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.
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 ProfilerTraceBuilder hardcodes the cross-origin isolation capability to true when converting timestamps, so the time clamper uses the fine 5μs resolution instead of the coarse 100μs resolution for non-isolated pages.
Impact
An attacker could potentially use the high-resolution timestamps to conduct cache-timing attacks (such as Spectre) to read sensitive cross-origin data within the same renderer process, bypassing a side-channel defense-in-depth mitigation.
What the attacker needed
Page served over HTTPS; Document-Policy: js-profiling header; page not cross-origin isolated
The fix
The fix should plumb the actual cross-origin isolation state into ProfilerTraceBuilder so that timestamps are correctly clamped to 100μs in non-isolated contexts.
How it was found
- Serve an HTML page over HTTPS with the HTTP header `Document-Policy: js-profiling`.
- Ensure the page is not cross-origin isolated (no COOP/COEP headers, and `window.crossOriginIsolated === false`).
- In the page script, instantiate a profiler with `new Profiler({sampleInterval: 10, maxBufferSize: 10000})`.
- Execute a busy loop for approximately one second to generate CPU samples.
- Stop the profiler and retrieve the trace data with `await p.stop()`.
- Inspect `trace.samples[i].timestamp` and observe that values are quantized to 0.005 ms (5μs) increments, while `performance.now()` is clamped to 0.1 ms (100μs).
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.
Web browsers deliberately make high-precision timers less precise (coarser) on ordinary web pages to make it harder for attackers to measure tiny time differences that can leak secret data. This report found that a profiling feature ignored that rule and gave out very precise timestamps anyway. An attacker could use those timestamps to perform timing attacks that might read data from other websites.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.