Inappropriate implementation in WebXR (CVE-2026-17892)
The cubemap swap chain's internal copy-draw did not reset the page-controlled polygon mode, so a page could set wireframe mode and leave the interior of the wrapped image unwritten. This could disclose stale or uninitialised GPU memory on the headset display.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 43 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 state of the WEBGL_polygon_mode extension can potentially leak into the internal copy-draw operations of XRWebGLCubemapSwapChain::OnFrameEnd. If an attacking page sets the polygon mode to wireframe, the internal copy-draws will render only edges, leaving the wrapped SharedImage interior unwritten. This can potentially result in the visual disclosure of uninitialized or stale GPU memory on the Head-Mounted Display (HMD).
Affected files:
third_party/blink/renderer/modules/xr/xr_webgl_cubemap_swap_chain.cc
Estimated timestamp from git blame: 2025-11-19
Potential Vulnerability: Incomplete State Neutralization in XRWebGLCubemapSwapChain
Location
third_party/blink/renderer/modules/xr/xr_webgl_cubemap_swap_chain.cc:250-292
Description
An incomplete fix for a prior security issue (vulnerability 42691043, which neutralized WEBGL_polygon_mode state leak into WebXR internal copy-draws) only addressed XRWebGLTextureArraySwapChain::OnFrameEnd. Its sibling, XRWebGLCubemapSwapChain::OnFrameEnd, remains potentially vulnerable to the same class of state leakage.
The persistent GL state GL_POLYGON_MODE_ANGLE set by a page via the WEBGL_polygon_mode extension can leak into internal rendering commands executed on the page's WebGL context. Unlike the texture-array counterpart, the cubemap copy routine disables tests like DEPTH_TEST, STENCIL_TEST, CULL_FACE, BLEND, DITHER, and SCISSOR_TEST, but does not query or neutralize GL_POLYGON_MODE_ANGLE before invoking gl->DrawElements:
// third_party/blink/renderer/modules/xr/xr_webgl_cubemap_swap_chain.cc:250-292
gl->Disable(GL_DEPTH_TEST);
gl->Disable(GL_STENCIL_TEST);
gl->Disable(GL_CULL_FACE);
gl->Disable(GL_BLEND);
gl->Disable(GL_DITHER);
gl->Disable(GL_SCISSOR_TEST);
if (webgl2()) {
gl->Disable(GL_RASTERIZER_DISCARD);
}
// <-- NO PolygonModeANGLE(GL_FRONT_AND_BACK, GL_FILL_ANGLE) neutralization here
...
for (int i = 0; i < 6; ++i) {
gl->Viewport(descriptor().width * (i % 3), descriptor().height * (i / 3),
descriptor().width, descriptor().height);
gl->Uniform1f(face_index_uniform_, i);
gl->DrawElements(GL_TRIANGLES, std::size(kQuadIndices), GL_UNSIGNED_SHORT,
nullptr); // :290
}
Why the Destination is Uninitialized
During creation of the layer, the wrapped swap chain is allocated with clear_on_access = false, as specified in xr_webgl_binding.cc:
// We don't need to clear the buffer anyway because the wrapper
// XRWebGLCubemapSwapChain will do it.
XRWebGLSwapChain* texture_2d_swapchain = CreateColorSwapchain(
init->colorFormat(),
gfx::Size(init->viewPixelWidth(), init->viewPixelHeight()),
V8XRTextureType(V8XRTextureType::Enum::kTexture),
V8XRLayerLayout::Enum::kMono, false /*clear_on_access*/);
Because clear_on_access is false, calling OnTextureQueried() on the wrapped swap chain bypasses ClearCurrentTexture(). If the page sets WEBGL_polygon_mode to wireframe mode (GL_LINE_ANGLE), the internal DrawElements call only draws the edges of the full-screen quad. The interior of the quad remains completely unwritten and contains stale or uninitialized GPU memory (such as previously allocated SharedImage bytes), which is subsequently submitted to the XR compositor and displayed on the user's headset.
Suggested Potential Reproduction Steps
Note: These are potential, theoretical steps modeled from code inspection, as our automated tooling cannot execute code directly.
- In an immersive WebXR session supporting the layers feature, the application obtains the 'WEBGL_polygon_mode' extension via
gl.getExtension('WEBGL_polygon_mode'). - The application creates a cube layer with
binding.createCubeLayer(...)and requests a sub-image to mark the texture as queried. - The application sets the polygon mode to wireframe:
ext.polygonModeWEBGL(gl.FRONT_AND_BACK, ext.LINE_WEBGL). - At frame submission,
XRWebGLCubemapSwapChain::OnFrameEnd()executes the internal draw without neutralizing the polygon mode. - The interior pixels of the wrapped SharedImage are left unwritten, potentially revealing stale VRAM contents on the HMD display.
Suggested Fix
To fix this potential issue, mirror the state neutralization logic from XRWebGLTextureArraySwapChain::OnFrameEnd to XRWebGLCubemapSwapChain::OnFrameEnd:
GLenum polygon_mode = GL_FILL_ANGLE;
if (context()->ExtensionsUtil()->IsExtensionEnabled('WEBGL_polygon_mode')) {
GLint value = 0;
gl->GetIntegerv(GL_POLYGON_MODE_ANGLE, &value);
polygon_mode = static_cast<GLenum>(value);
gl->PolygonModeANGLE(GL_FRONT_AND_BACK, GL_FILL_ANGLE);
}
// ... performs DrawElements ...
if (polygon_mode != GL_FILL_ANGLE) {
gl->PolygonModeANGLE(GL_FRONT_AND_BACK, polygon_mode);
}
Evaluated with Chrome root at commit: 75203b87cbf6681eb7c7dda8e1d0bf781538c76a
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 cubemap swap chain's frame-end routine disabled several GL states but never queried or reset the page-settable polygon mode before its internal draw, unlike its texture-array sibling.
Impact
Could result in visual disclosure of uninitialised or stale GPU memory on the head-mounted display; the report notes the steps are theoretical and were not executed.
What the attacker needed
Immersive WebXR session; layers feature supported; polygon mode extension available
The fix
The frame-end routine should save the current polygon mode, force fill mode for the internal draw, then restore the page's value, mirroring the texture-array swap chain.
How it was found
- In an immersive WebXR session with layers support, obtain the polygon mode extension.
- Create a cube layer and request a sub-image so the texture is marked as queried.
- Set the polygon mode to wireframe for front and back faces.
- Submit the frame so the cubemap swap chain's frame-end routine runs its internal draw.
- The interior pixels stay unwritten, potentially showing stale graphics memory on the headset.
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 web page can change a drawing setting that makes shapes render as outlines only. The browser reuses that same drawing context for an internal step that fills a texture, and it forgot to reset the setting first, so the fill only draws the outline and the middle keeps whatever was in graphics memory before. That leftover memory could then be shown to the person wearing the headset.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.