Out of bounds read in WebXR (CVE-2026-17869)
An out-of-bounds heap read was found in the WebXR cube map upload path, where tightly packed CPU buffers are sent to WebGL without resetting stale pixel-store unpack parameters. A page could set an inflated row length so the GLES2 client over-reads adjacent heap memory into a WebGL texture it can then read back.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 51 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: An out-of-bounds heap read potentially exists in XRCubeMap::updateWebGLEnvironmentCube when updating WebGL environment cube maps. The function uploads tightly-packed CPU-backed vectors to the page's WebGL context without resetting stale pixel-store unpack parameters such as UNPACK_ROW_LENGTH. A web page could potentially pre-configure these parameters to cause the GLES2 client to over-read the allocated vector buffers into a JS-readable WebGL texture.
Affected files:
third_party/blink/renderer/modules/xr/xr_cube_map.ccthird_party/blink/renderer/modules/xr/xr_webgl_binding.cc
Estimated timestamp from git blame: 2020-01-16
Root Cause Analysis
In XRCubeMap::updateWebGLEnvironmentCube (located in third_party/blink/renderer/modules/xr/xr_cube_map.cc), raw pointers to tightly packed CPU buffers (Vector<uint16_t> or converted Vector<uint8_t>) are uploaded directly to the page's WebGL context via gl->TexImage2D() without resetting the pixel-store unpack state.
If the calling page has previously configured ES3/WebGL2 unpack parameters (such as GL_UNPACK_ROW_LENGTH, GL_UNPACK_SKIP_ROWS, or GL_UNPACK_SKIP_PIXELS) using gl.pixelStorei(), these parameters remain active on the ContextGL(). When TexImage2D is invoked on the client-side command buffer wrapper (GLES2Implementation), the GLES2 client uses these parameters to compute the expected size of the input pointer:
PixelStoreParams params = GetUnpackParameters(k2D);
GLES2Util::ComputeImageDataSizesES3(width, height, 1, format, type, params, ...);
If UNPACK_ROW_LENGTH is configured to a value significantly larger than the texture width, the GLES2 client constructs an inflated base::span over the source pointer. During the pixel copy loop in CopyRectToBuffer, the client strides through the source pointer using the inflated row length, copying out-of-bounds heap memory into the transfer buffer used to upload the texture data.
Potential Trigger Steps
Note: These steps are theoretical/potential as our tooling does not currently run code to verify live exploits.
- A page initializes an immersive-ar WebXR session with the
light-estimationfeature enabled. - The page initializes a WebGL2 rendering context with
xrCompatible: trueand configuresgl.pixelStorei(gl.UNPACK_ROW_LENGTH, 4096). - An
XRWebGLBindingis created for the session. - When a
reflectionchangeevent occurs, the page callsbinding.getReflectionCubeMap(lightProbe). - During
updateWebGLEnvironmentCube, the GLES2 client processes the raw tightly packed buffer of size16x16under the assumption of a row stride of4096pixels. This results in an out-of-bounds read of the heap adjacent to the vector allocation. - The page binds the returned WebGL cube-map texture, attaches its faces to a framebuffer, and uses
readPixelsor shader sampling to read back the leaked heap memory.
Suggested Fix
To resolve this issue, Blink should ensure that the unpack parameters are temporarily reset to their default values prior to invoking raw-pointer uploads in the WebXR pipeline. This can be accomplished by instantiating a ScopedUnpackParametersResetRestore helper class on the rendering context inside XRCubeMap::updateWebGLEnvironmentCube before issuing the TexImage2D calls:
// Enforce a temporary reset of unpack parameters to avoid stale WebGL state over-reading CPU vectors
ScopedUnpackParametersResetRestore unpack_params(context);
This pattern matches the mitigation strategy employed in other Blink WebGL texture upload paths.
Evaluated with Chrome root at commit: 3947e01999a53d4e2382e39736cb79d79c7dffcf
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 WebXR cube map upload passes raw pointers to TexImage2D without resetting the caller-controlled pixel-store unpack parameters, so the GLES2 client computes an inflated source span and strides out of bounds.
Impact
A page could potentially leak adjacent heap memory into a texture it can read, though the report notes the steps are theoretical and were not verified with a live exploit.
What the attacker needed
WebXR light-estimation support; Page runs its own JavaScript; Victim visits the malicious page
The fix
Blink should reset the unpack parameters to their defaults around the raw-pointer uploads in the WebXR pipeline, for example with the existing scoped reset helper.
How it was found
- Start an immersive-ar WebXR session with light estimation enabled.
- Create a WebGL2 context marked as XR compatible and set a large unpack row length.
- Create an XRWebGLBinding for the session.
- On a reflectionchange event, request the reflection cube map for the light probe.
- The upload reads past the small source buffer using the inflated row stride.
- Read the resulting texture back through a framebuffer to obtain leaked heap memory.
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 web page uploads image data to the graphics card, it can set options that describe how the data is laid out in memory, such as how many pixels are in each row. This code forgot to reset those options before uploading its own data, so a page could set a huge row length and make the browser read past the end of its buffer. The extra memory read could then be copied into a texture the page can inspect, leaking data from the browser's memory.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.