Skip to content
Memory corruption Advisory Advanced CVE-2025-12443

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.

Aisle Research Follow

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::ColMajorF assumes 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 hands XRRay a fresh zero-length DOMFloat32Array, which is then forwarded to Transform::ColMajorF without 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:

C++
// 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]));
}
C++
// 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));
}
C++
// 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);
}
C++
// 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

  1. Launch Chromium/Chrome debug

  2. 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
    
  3. Observe FATAL:third_party/blink/renderer/modules/xr/xr_utils.cc:26] DCHECK failed: m->length() == 16u (0 vs. 16)

REPRODUCTION CASE - OOB READ

  1. Launch Chromium/Chrome release
  2. Run poc-min-leak.js
  3. Observe leaked marked data

Similar Findings (related patterns in current code)

  • XRView::projectionMatrix() returns a zero-length DOMFloat32Array when detached, mirroring the XRRigidTransform::matrix() behavior. While not currently passed to Transform::ColMajorF, this could become exploitable if used in transform code.
    • Location: third_party/blink/renderer/modules/xr/xr_view.cc lines 79–85
  • WTFFloatVectorToTransform(const Vector<float>&) forwards raw m.data() to Transform::ColMajorF with 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.cc lines 30–33

CREDIT INFORMATION

Reporter credit: Aisle Research

The original report as published on the Chromium issue tracker, by Aisle Research. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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

  1. Open a Chromium or Chrome debug build and use the renderer console.
  2. Create an XRRigidTransform and take its matrix array.
  3. Detach the array's buffer by transferring it through a MessageChannel port.
  4. Construct an XRRay from the transform, which triggers the out-of-bounds read.
  5. 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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.