Uninitialized Use in WebML (CVE-2026-11033)
The WebNN CoreML backend on macOS fails to zero-initialize IOSurface-backed float16 tensors, and a missing size validation in WebNNContextImpl allows a web page or compromised renderer to read uninitialized GPU memory. This could leak sensitive cross-origin texture data or other process memory.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: The WebNN CoreML backend on macOS fails to zero-initialize IOSurface-backed float16 tensors. Combined with a missing size validation check in WebNNContextImpl, this allows a web page or compromised renderer to read uninitialized GPU memory. This could leak sensitive cross-origin texture data or other process memory.
Affected files:
services/webnn/coreml/tensor_impl_coreml.mmservices/webnn/webnn_context_impl.ccservices/webnn/coreml/utils_coreml.mm
Estimated timestamp from git blame: 2025-08-18
Description
A potential uninitialized memory disclosure exists in the WebNN CoreML backend on macOS, which could allow an attacker to read uninitialized GPU process memory (such as recycled IOSurface buffers containing cross-origin WebGL textures or UI data).
There are two root causes that enable this:
-
Missing Zero-Initialization in CoreML Backend: In
services/webnn/coreml/tensor_impl_coreml.mm, the functionCreateMultiArrayBackedByIOSurfaceis used to allocate memory forfloat16tensors. It callsIOSurfaceCreatebut fails to clear or zero-initialize the newly allocated surface. This contrasts withCreateMultiArrayFromDescriptor(used for other types), which explicitly usesmemsetto zero out the memory. -
Missing Size Validation in WebNNContext: In
services/webnn/webnn_context_impl.cc, theWebNNContextImpl::CreateTensormethod contains a size-validation checktensor_data.size() != validated_descriptor->PackedByteLength(). However, this check is only performed if the tensor has thekGraphConstantusage flag. For non-constant tensors, it accepts an empty buffer (assuming the backend already zero-initialized the tensor) or an undersized buffer.
Potential Steps to Trigger
Note: These are suggested steps based on static analysis; our tooling cannot execute working proofs-of-concept to verify them dynamically.
Path A: Standard Web Page
- An attacker's web page calls
MLContext.createTensor()requesting afloat16tensor. - The renderer sends a
CreateTensorMojo IPC with an emptyBigBuffer(0)for the initial data. - The GPU process allocates the
IOSurfaceviaCreateMultiArrayBackedByIOSurface(leaving it uninitialized). - In
WebNNContextImpl::CreateTensor, because the buffer size is 0, the code skips callingWriteTensorImpl(relying on the false assumption that the tensor is already zero-initialized). - The attacker calls
MLTensor.read()to read the tensor, receiving the uninitializedIOSurfacememory.
Path B: Compromised Renderer
- A compromised renderer sends a
CreateTensorMojo IPC for a largefloat16tensor (e.g., 2MB) but provides a tinytensor_databuffer (e.g., 1 byte). - Because the validation check is skipped for non-constant tensors,
WebNNContextImpl::CreateTensoraccepts the 1-byte buffer and passes it toWriteTensorImpl. RecursivelyWriteToMLMultiArray(inutils_coreml.mm) copies the 1-byte prefix into the tensor, leaving the rest of the 2MBIOSurfaceuninitialized.- The compromised renderer sends a
ReadTensorIPC, extracting the full 2MB of uninitialized memory.
Suggested Fix
- Zero-Initialize IOSurfaces: In
CreateMultiArrayBackedByIOSurface(services/webnn/coreml/tensor_impl_coreml.mm), map the newly createdCVPixelBufferorIOSurfaceand explicitly zero-initialize its contents before returning it. - Enforce Size Validation: In
WebNNContextImpl::CreateTensor(services/webnn/webnn_context_impl.cc), ensure thattensor_data.size()is validated againstvalidated_descriptor->PackedByteLength()for all tensors, not justkGraphConstanttensors. The size should be strictly equal to either0(for uninitialized/default tensors) or the exact packed byte length.
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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 combination of missing zero-initialization in CreateMultiArrayBackedByIOSurface and a size-validation check in WebNNContextImpl::CreateTensor that only applies to constant tensors, allowing empty or undersized buffers to be accepted for non-constant tensors.
Impact
This could leak sensitive cross-origin texture data or other process memory, but the report notes these are suggested steps based on static analysis and not dynamically verified.
What the attacker needed
MacOS with WebNN CoreML backend; victim visits attacker's web page; or compromised renderer
The fix
The fix should zero-initialize IOSurfaces in CreateMultiArrayBackedByIOSurface and enforce size validation for all tensors in WebNNContextImpl::CreateTensor.
How it was found
- An attacker's web page calls MLContext.createTensor() requesting a float16 tensor.
- The renderer sends a CreateTensor Mojo IPC with an empty BigBuffer(0) for the initial data.
- The GPU process allocates the IOSurface via CreateMultiArrayBackedByIOSurface, leaving it uninitialized.
- In WebNNContextImpl::CreateTensor, because the buffer size is 0, the code skips calling WriteTensorImpl.
- The attacker calls MLTensor.read() to read the tensor, receiving the uninitialized IOSurface 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 program allocates memory, it should clear it first so old data from other programs cannot be seen. Here, a part of the browser that handles machine learning tensors forgot to clear the memory, and another check that should ensure the right amount of data was provided was skipped. This means a malicious web page could read leftover data from the graphics card, which might include images from other websites.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.