Observable discrepancy in PerformanceAPIs (CVE-2026-78955)
The Long Animation Frame API exposed uncoarsened microsecond-level task durations when a long task did not trigger a rendering update, bypassing Chromium's time-clamping mitigations. An attacker could use this high-precision timer to conduct Cross-Site Leaks (XS-Leaks) by measuring victim execution time.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
Flapjack, 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: The Long Animation Frame (LoAF) API exposes the main thread task duration to JavaScript. When a long task completes without triggering a rendering update, the exposed duration bypasses Chromium's time-coarsening mitigations. This provides attackers with a high-precision timer that could potentially be leveraged for Cross-Site Leaks (XS-Leaks).
Affected files:
third_party/blink/renderer/core/timing/performance_long_animation_frame_timing.cc
Estimated timestamp from git blame: 2024-12-05
Description
The Long Animation Frame (LoAF) API provides information about long tasks on the main thread. To mitigate side-channel timing attacks such as Cross-Site Leaks (XS-Leaks), Chromium requires all web-exposed timing data to be coarsened (clamped) to a specific resolution (typically 100μs, or 5μs in cross-origin isolated contexts).
A potential vulnerability exists in the LoAF implementation where the duration attribute can bypass this clamping mechanism, exposing microsecond-level precision to JavaScript.
Root Cause Analysis
In third_party/blink/renderer/core/timing/performance_long_animation_frame_timing.cc, the PerformanceLongAnimationFrameTiming::Create method computes the entry's duration:
double duration = paint_timing_info
? (paint_timing_info->paint_time - startTime)
: info->Duration().InMillisecondsF();
When paint_timing_info is absent, the code falls back to info->Duration().InMillisecondsF(). The info->Duration() method returns a base::TimeDelta representing the exact difference between two raw base::TimeTicks (RenderEndTime and FrameStartTime).
Because this raw value is converted directly to a double without passing through Performance::ClampTimeResolution, the resulting value retains uncoarsened microsecond-level precision.
The absence of paint_timing_info occurs when a long task does not schedule a rendering update. This happens in AnimationFrameTimingMonitor::OnTaskCompleted when client_.RequestedMainFramePending() evaluates to false.
Suggested Attacker Steps
Note: Our agent does not run arbitrary code, so these are potential steps detailing how an attacker might exploit this based on static analysis.
- An attacker creates a malicious page and embeds a same-site cross-origin victim frame.
- The attacker's JavaScript initiates a synchronous task and triggers a sensitive operation in the victim iframe (e.g., accessing a property that forces a synchronous layout). The execution time will depend on the victim's cross-origin state.
- Within the same task, the attacker's script executes a busy-wait loop until the total task execution time exceeds 50ms (
kLongAnimationFrameDuration). - The attacker ensures no DOM mutations are made in their own frame, keeping
RequestedMainFramePending()false and bypassing the rendering update path. - The browser constructs the LoAF entry using the uncoarsened
info->Duration()fallback and dispatches it to the attacker'sPerformanceObserver. - The attacker reads the
.durationattribute, acquiring a microsecond-precision measurement of the task, allowing them to isolate the victim's execution time and conduct an XS-Leak.
Suggested Fix
The fallback duration calculation in PerformanceLongAnimationFrameTiming::Create must be properly clamped before being exposed to JavaScript.
A potential fix is to pass the value through the existing clamping utilities:
double duration = paint_timing_info
? (paint_timing_info->paint_time - startTime)
: performance->ClampTimeResolution(info->Duration().InMillisecondsF(), cross_origin_isolated_capability);
Alternatively, duration could be computed as the difference between the clamped end time and the clamped start time to ensure consistency across the API.
Evaluated with Chrome root at commit: b7d0c4d810da1b31400f198c70d9720fc8f0e5a0
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.
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 fallback duration calculation in PerformanceLongAnimationFrameTiming::Create uses the raw task duration without passing it through the time-clamping function.
Impact
An attacker could obtain a high-precision timer that may be used to conduct Cross-Site Leaks (XS-Leaks), though the report only describes potential steps based on static analysis.
What the attacker needed
Victim visits attacker's page; attacker embeds same-site cross-origin frame; attacker can trigger synchronous work in victim
The fix
The fallback duration calculation should be clamped using the existing time-resolution clamping utilities before being exposed to JavaScript.
How it was found
- An attacker creates a malicious page and embeds a same-site cross-origin victim frame.
- The attacker's JavaScript initiates a synchronous task and triggers a sensitive operation in the victim iframe.
- Within the same task, the attacker's script executes a busy-wait loop until the total task execution time exceeds 50ms.
- The attacker ensures no DOM mutations are made in their own frame, keeping RequestedMainFramePending() false.
- The browser constructs the LoAF entry using the uncoarsened fallback and dispatches it to the attacker's PerformanceObserver.
- The attacker reads the .duration attribute, acquiring a microsecond-precision measurement of the task.
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 blur precise timing data to stop attackers from measuring tiny delays that reveal secret information about other websites. Here, a timing value was not blurred in one specific case, so an attacker could get a very precise measurement. That measurement could be used to guess things about another site the user is logged into.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.