Inappropriate implementation in PerformanceAPIs (CVE-2026-13952)
The Long Animation Frame API incorrectly identifies the script origin for callbacks bound multiple times, allowing a page to discover sensitive function names from cross-origin scripts that should remain opaque. An attacker could learn source-level function names from third-party no-CORS scripts, potentially revealing application state or user status.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 47 days
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: The Long Animation Frame (LoAF) API incorrectly identifies the script origin for callbacks that have been bound multiple times via Function.prototype.bind. This allows a page to discover sensitive function names from cross-origin scripts that should remain opaque, bypassing intended cross-origin information leak protections.
Affected files:
third_party/blink/renderer/core/frame/animation_frame_timing_monitor.cc
Estimated timestamp from git blame: 2023-12-01
Summary
A potential vulnerability in the Long Animation Frame (LoAF) API allows a page to discover the sourceFunctionName of callbacks defined in no-CORS (opaque) cross-origin scripts. The issue occurs because the code responsible for sanitizing sensitive information from LoAF entries only unwraps a single level of Function.prototype.bind when checking for script opaqueness.
Root Cause
In third_party/blink/renderer/core/frame/animation_frame_timing_monitor.cc, the function CaptureScriptSourceLocation extracts function names and locations for LoAF entries. To handle bound functions, it attempts to unwrap them using v8::Function::GetBoundFunction():
// third_party/blink/renderer/core/frame/animation_frame_timing_monitor.cc:741
v8::Local<v8::Value> bound = value.As<v8::Function>()->GetBoundFunction();
if (!bound.IsEmpty() && bound->IsFunction()) {
value = bound;
}
This implementation only unwraps exactly one level of binding. If a callback is bound two or more times (e.g., func.bind(x).bind(y)), the resulting value remains a v8::JSBoundFunction rather than the underlying v8::JSFunction defined in the script.
When CaptureScriptSourceLocation calls v8::Function::GetScriptOrigin() on a v8::JSBoundFunction, the V8 API returns a default-constructed v8::ScriptOrigin because it is not a v8::JSFunction. In V8, a default-constructed v8::ScriptOrigin has its IsOpaque() property set to false by default.
This causes the security check in Blink to be bypassed:
// third_party/blink/renderer/core/frame/animation_frame_timing_monitor.cc:758
// Opaque scripts don't report character index/function name.
if (origin.Options().IsOpaque()) {
return source_location;
}
Since IsOpaque() evaluates to false, the code proceeds to call function->GetName(). Unlike GetScriptOrigin(), v8::Function::GetName() correctly traverses the binding chain and resolves the name of the underlying function. This results in the source-level function name being leaked to the LoAF script entry.
Potential Impact
An attacker could potentially learn the source-level function names of callbacks defined in third-party, no-CORS scripts. Function names can reveal sensitive information about the application state or user status (e.g., onUserLoggedIn, handleSensitiveAction). This is a cross-origin information leak (XS-Leak) from a script that the browser is intended to keep opaque.
Suggested Reproduction Steps
- Host a script
sdk.json Origin B that defines a function with a sensitive name. - In
sdk.js, bind that function twice:const callback = targetFunction.bind(null).bind(null);. - Register the double-bound function as an event listener.
- On Origin A, embed the script without CORS:
<script src="https://origin-B.com/sdk.js"></script>. - On Origin A, observe LoAF entries using a
PerformanceObserver. - Trigger the callback on the page. The
PerformanceScriptTimingentry in the LoAF report will likely expose thesourceFunctionName, revealing the private name from the opaque script.
Suggested Fix
Modify CaptureScriptSourceLocation in third_party/blink/renderer/core/frame/animation_frame_timing_monitor.cc to recursively unwrap bound functions using a loop, similar to how it is handled in the V8 inspector:
while (value->IsFunction()) {
v8::Local<v8::Value> bound = value.As<v8::Function>()->GetBoundFunction();
if (bound.IsEmpty() || !bound->IsFunction()) {
break;
}
value = bound;
}
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
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
The code only unwraps one level of Function.prototype.bind when checking if a script is opaque, so a double-bound function is treated as non-opaque and its name is leaked.
Impact
An attacker could potentially learn the source-level function names of callbacks defined in third-party, no-CORS scripts, which may reveal sensitive information about application state or user status.
What the attacker needed
Victim visits attacker page; attacker page embeds cross-origin script; script uses double-bound callback
The fix
The code should be modified to recursively unwrap bound functions using a loop, similar to how it is handled in the V8 inspector.
How it was found
- Host a script on Origin B that defines a function with a sensitive name.
- In that script, bind the function twice.
- Register the double-bound function as an event listener.
- On Origin A, embed the script without CORS.
- On Origin A, observe LoAF entries using a PerformanceObserver.
- Trigger the callback on the page to expose the sourceFunctionName.
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 loads a script from another site without permission to read its contents, the browser normally hides details like function names to protect privacy. This bug shows that if a function is wrapped twice using a common JavaScript method, the browser mistakenly reveals its name. An attacker could then guess what the function does, like whether a user is logged in.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.