CVE-2026-43700
Overview
Background
- importExternalTexture
- A WebGPU API ingesting HTMLVideoElement frames as a texture that shaders can sample and read back.
- Origin taint / taintsOrigin
- Cross-origin non-CORS media is tainted; its pixels must not be readable, as canvas enforces.
- External-texture reuse path
- A Cocoa fast path that undestroys/reuses a previously-created external texture; it also needs the taint check.
Root Cause Analysis
This closes remaining cross-origin video paths in WebGPU’s importExternalTexture that were not covered by the origin-taint check, defeating the Same-Origin Policy for video pixels. GPUDevice::importExternalTexture ingests an HTMLVideoElement’s frames as a WebGPU external texture that a shader can sample and read back. To respect the SOP (as canvas does by tainting), an origin-taint check must reject a cross-origin, non-CORS video before it enters the pipeline.
Pre-patch, importExternalTexture had paths that imported the video WITHOUT that check — notably the Cocoa fast path that reuses/undestroys a previously-created external texture (externalTextureForDescriptor) and the main import path.
The fix adds a checkVideoElementOriginTaint lambda that fetches the caller’s security origin from scriptExecutionContext()->securityOrigin() and, if videoElement.taintsOrigin(securityOrigin), returns a SecurityError (‘Cross origin external videos are not allowed in WebGPU’); it invokes this check on BOTH the reused-external-texture path and the main path before importing.
The restored invariant is that a cross-origin tainted video cannot enter (or be reused in) a WebGPU external texture through any importExternalTexture path, so its pixels cannot be sampled and exfiltrated. This is an information-disclosure fix, not memory corruption.
Attack Path
- Load a cross-origin video Load a cross-origin video without CORS so it is origin-tainted.
- Import it as an external texture Call GPUDevice.importExternalTexture on the tainted video, hitting a path that lacked the taint check (e.g. the reused-texture fast path).
- Sample and read back Sample the external texture in a shader and read the result into a GPU buffer readable by script.
- Exfiltrate cross-origin pixels Recover the cross-origin video’s pixels, defeating the Same-Origin Policy.
Impact Assessment
Changed Functions
| Function | Change | Notes |
|---|---|---|
GPUDevice::importExternalTextureSource/WebCore/Modules/WebGPU/GPUDevice.cpp |
modified | Adds checkVideoElementOriginTaint (using scriptExecutionContext()->securityOrigin() and videoElement.taintsOrigin) and applies it on both the reused/undestroyed external-texture path and the main import path, rejecting cross-origin tainted video with a SecurityError. |
Files Changed
LayoutTests/fast/webgpu/regression/repro_315368-expected.txtLayoutTests/fast/webgpu/regression/repro_315368.htmlLayoutTests/fast/webgpu/regression/repro_315368b-expected.txtLayoutTests/fast/webgpu/regression/repro_315368b.htmlSource/WebCore/Modules/WebGPU/GPUDevice.cpp
Audit Directions
- All media-ingestion pathsAudit every importExternalTexture / external-texture reuse and update path (and WebGL video uploads) for a consistent taintsOrigin check.
- Origin retrievalConfirm each path obtains the caller’s security origin (scriptExecutionContext()->securityOrigin()) before importing media.