Out of bounds read in WebXR (CVE-2025-12443)
A WebXR API path lets a page detach the cached matrix buffer of an XRRigidTransform, after which constructing an XRRay forwards a zero-length array into a transform helper that reads 16 floats unconditionally. This causes a 64-byte out-of-bounds read that can leak heap data back to script through the ray's origin and direction, or crash debug builds.
Originally disclosed on Chrome VRP
- Fix shipped in 14 days
Security Bug
We have discovered a potential issue in Chromium that lets WebXR content trigger an out-of-bounds read in the renderer by feeding a zero-length buffer into gfx::Transform::ColMajorF.
Vulnerability Details
Transform::ColMajorFassumes the caller has provided 16 floats and blindly reads indices 0–15; the surrounding UNSAFE_TODO macros do not add checks.- When a page detaches the cached matrix buffer on an
XRRigidTransform, Blink currently handsXRRaya fresh zero-lengthDOMFloat32Array, which is then forwarded toTransform::ColMajorFwithout validation. - This results in a 64-byte read past the view, leaking heap data back to script via
XRRay's origin/direction, or crashing on debug builds.
Code Snippets:
// ui/gfx/geometry/transform.cc (lines 115-130, current HEAD)
Transform Transform::ColMajorF(const float a[16]) {
if (AllTrue(Float4{UNSAFE_TODO(a[1]), UNSAFE_TODO(a[2]), UNSAFE_TODO(a[3]),
UNSAFE_TODO(a[4])} == Float4{0, 0, 0, 0} &
Float4{UNSAFE_TODO(a[6]), UNSAFE_TODO(a[7]), UNSAFE_TODO(a[8]),
UNSAFE_TODO(a[9])} == Float4{0, 0, 0, 0} &
Float4{UNSAFE_TODO(a[10]), UNSAFE_TODO(a[11]), UNSAFE_TODO(a[14]),
UNSAFE_TODO(a[15])} == Float4{1, 0, 0, 1})) {
return Transform(a[0], UNSAFE_TODO(a[5]), UNSAFE_TODO(a[12]),
UNSAFE_TODO(a[13]));
}
return Transform(a[0], UNSAFE_TODO(a[1]), UNSAFE_TODO(a[2]),
UNSAFE_TODO(a[3]), UNSAFE_TODO(a[4]), UNSAFE_TODO(a[5]),
UNSAFE_TODO(a[6]), UNSAFE_TODO(a[7]), UNSAFE_TODO(a[8]),
UNSAFE_TODO(a[9]), UNSAFE_TODO(a[10]), UNSAFE_TODO(a[11]),
UNSAFE_TODO(a[12]), UNSAFE_TODO(a[13]), UNSAFE_TODO(a[14]),
UNSAFE_TODO(a[15]));
}
// third_party/blink/renderer/modules/xr/xr_rigid_transform.cc (lines 115-120, current HEAD)
if (!matrix_array_ || matrix_array_->IsDetached()) {
// A page may take the matrix_array_ value and detach it so matrix_array_ is
// a detached array buffer. This breaks the inspector, so return an empty
// array instead.
return NotShared<DOMFloat32Array>(DOMFloat32Array::Create(0));
}
// third_party/blink/renderer/modules/xr/xr_ray.cc (lines 38-40, current HEAD)
XRRay::XRRay(XRRigidTransform* transform, ExceptionState& exception_state) {
NotShared<DOMFloat32Array> m = transform->matrix();
Set(DOMFloat32ArrayToTransform(m), exception_state);
}
// third_party/blink/renderer/modules/xr/xr_utils.cc (lines 25-28, current HEAD)
gfx::Transform DOMFloat32ArrayToTransform(NotShared<DOMFloat32Array> m) {
DCHECK_EQ(m->length(), 16u);
return gfx::Transform::ColMajorF(m->Data());
}
VERSION
- Chrome Version: Chromium 143.0.7470.0, Chromium 141.0.7390.65 built on Debian GNU/Linux 13 (trixie)
- Operating System:
Debian GNU/Linux 13 (trixie)
REPRODUCTION CASE - DEBUG BUILD
-
Launch Chromium/Chrome debug
-
In a renderer console:
JavaScript const t = new XRRigidTransform(); const arr = t.matrix; const ch = new MessageChannel(); ch.port1.postMessage(arr.buffer, [arr.buffer]); // detaches arr const ray = new XRRay(t); // triggers ColMajorF read -
Observe
FATAL:third_party/blink/renderer/modules/xr/xr_utils.cc:26] DCHECK failed: m->length() == 16u (0 vs. 16)
REPRODUCTION CASE - OOB READ
- Launch Chromium/Chrome release
- Run poc-min-leak.js
- Observe leaked marked data
Similar Findings (related patterns in current code)
XRView::projectionMatrix()returns a zero-lengthDOMFloat32Arraywhen detached, mirroring theXRRigidTransform::matrix()behavior. While not currently passed toTransform::ColMajorF, this could become exploitable if used in transform code.- Location:
third_party/blink/renderer/modules/xr/xr_view.cclines 79–85
- Location:
WTFFloatVectorToTransform(const Vector<float>&)forwards rawm.data()toTransform::ColMajorFwith only a DCHECK on size. This is currently unused but should be hardened to prevent future misuse.- Location:
third_party/blink/renderer/modules/xr/xr_utils.cclines 30–33
- Location:
CREDIT INFORMATION
Reporter credit: Aisle Research
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 a missing length check: the transform helper assumes 16 floats are present, while the WebXR layer can supply a zero-length array after the page detaches the buffer.
Impact
A malicious page could read up to 64 bytes of adjacent heap memory through the ray's origin and direction values, or crash debug builds; the text does not claim full control of execution.
What the attacker needed
WebXR-capable browser; page runs script in the renderer
How it was found
- Open a Chromium or Chrome debug build and use the renderer console.
- Create an XRRigidTransform and take its matrix array.
- Detach the array's buffer by transferring it through a MessageChannel port.
- Construct an XRRay from the transform, which triggers the out-of-bounds read.
- Observe the DCHECK failure reporting a length of 0 instead of 16.
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.
Some browser code assumes it will always be handed a list of 16 numbers, but a web page can empty that list first. The code then reads past the end of the empty list, picking up nearby memory contents that the page can read back. This is an information leak, and on debug builds it simply crashes.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.