Inappropriate implementation in WebGL (CVE-2026-15127)
A WebGL method caches a promise resolver on a context object shared between the main world and isolated worlds, so a page can receive a promise created in an extension's world. The page could then reach the isolated world's Object.prototype and pollute it, potentially leading to universal XSS.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 25 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: A potential cross-world V8 Promise leak exists in WebGLRenderingContextBase::makeXRCompatible(). The method improperly caches a single world-bound ScriptPromiseResolver on a shared C++ context object, allowing a malicious webpage to obtain a raw v8::Promise belonging to a privileged isolated world (like an extension). This leak can be exploited to achieve Universal XSS via prototype pollution.
Affected files:
third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.ccthird_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
Estimated timestamp from git blame: Unknown (Google3 checkout)
Summary
A cross-world V8 Promise leak has been identified in WebGLRenderingContextBase::makeXRCompatible(). In Blink, a single WebGLRenderingContextBase C++ object is shared between the main world and isolated worlds (like those of extensions) when they access the same <canvas> element via getContext(). However, makeXRCompatible() caches a ScriptPromiseResolver in a member variable that is not world-aware. If an isolated world initiates the async request and the main world subsequently calls the method while the request is pending, the main world receives the isolated world's promise. This allows the main world to pollute the isolated world's Object.prototype.
Vulnerability Details
- Shared Context:
HTMLCanvasElement::GetCanvasRenderingContextInternalcaches and returns the same underlyingWebGLRenderingContextBaseC++ object for a<canvas>, regardless of which V8 world requested it. - World-Bound Resolver: When
makeXRCompatible()is called, it creates aScriptPromiseResolverbound to the caller'sScriptState(V8 context) and caches it inmake_xr_compatible_resolver_(third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc:994-996). - The Leak: If the method is called again while the asynchronous request is pending, it returns
make_xr_compatible_resolver_->Promise()(line 992). If the second caller is from a different V8 world, it receives thev8::Promisecreated in the first caller's world. - No Binding Checks: The auto-generated V8 bindings for this method do not perform cross-context security checks on the returned promise (it lacks the
[CheckSecurity=ReturnValue]IDL attribute), allowing the raw cross-world promise to be returned directly to JavaScript.
Potential Exploitation Steps
Note: These are potential steps based on code analysis; our tooling agent does not run code to verify a working proof-of-concept.
- An attacker's webpage injects a
<canvas>element into the DOM. - A privileged browser extension (running in an isolated world) interacts with the DOM, accesses the canvas, and calls
makeXRCompatible()on its WebGL context. - Before the asynchronous GPU check completes, the attacker's webpage intercepts execution (e.g., via a synchronous getter trap) and calls
makeXRCompatible()on the same canvas's context. - Blink returns the pending
ScriptPromise, giving the attacker's webpage the rawv8::Promiseinstantiated in the extension's isolated world. - The attacker's JavaScript traverses the prototype chain (
Object.getPrototypeOf(Object.getPrototypeOf(leaked_promise))) to obtain the isolated world'sObject.prototype. - The attacker pollutes
Object.prototype(e.g., overriding.thenor poisoning configuration objects). - When the isolated world continues execution and handles the promise resolution, the attacker's malicious prototype methods execute within the extension's privileged context, achieving Universal XSS (UXSS) and an isolated world escape.
Suggested Fix
Replace the single make_xr_compatible_resolver_ member with a mechanism that safely tracks promises on a per-world basis. Using ScriptPromiseProperty<IDLUndefined, IDLAny> is the standard Blink pattern for this, as it inherently manages promises for multiple worlds accessing the same underlying state. Alternatively, if multiple concurrent requests from different worlds are not expected or supported, the method could detect the world mismatch and reject the new promise or return a newly created chained promise.
Evaluated with Chrome root at commit: 65b3256311f3ab6fb9870eaa522de7e6dd2663bb
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 method caches a single world-bound ScriptPromiseResolver on a C++ context object shared across V8 worlds, and the bindings lack a cross-context security check on the returned promise.
Impact
A malicious page could potentially escape its isolated world and run code in a privileged extension's context, achieving universal XSS; the report notes the steps are based on code analysis and were not run.
What the attacker needed
Victim visits attacker's page; a privileged extension uses the same canvas; attacker calls the method while request pending
The fix
The single resolver member should be replaced with a per-world mechanism such as ScriptPromiseProperty, or the method should detect a world mismatch and reject or chain a new promise.
How it was found
- The attacker's page adds a canvas element to the DOM.
- A privileged extension accesses the canvas and calls makeXRCompatible() on its WebGL context.
- Before the asynchronous GPU check finishes, the page calls makeXRCompatible() on the same context.
- Blink returns the pending promise created in the extension's world.
- The page walks the prototype chain to reach the isolated world's Object.prototype.
- The page pollutes Object.prototype so its code runs in the extension's context.
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 page and a browser extension run in separate 'worlds' so they cannot normally touch each other's JavaScript objects. Here a WebGL function stored a promise (a placeholder for a future result) in a shared place without noting which world asked for it, so a page could get the extension's promise. From that promise the page could reach and change shared JavaScript building blocks used by the extension.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.