Medium CVSS 6.5 webkit Cross Origin 🔧 Commit mapped

Overview

Medium
Severity
6.5
CVSS
No
Exploited ITW
Fixed
Fix Status
DescriptionProcessing maliciously crafted web content may disclose sensitive user information
ComponentWebCore WebGPU
Bug ClassCross Origin
Tracker315368
Fix commit67b563b85f48 (WebKit/WebKit) +80/-0
CWECWE-346 (Origin validation error)
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
CISA KEVNot listed
CreditedVitaly Simonovich, Muhamad Syaiful, Christian Meurer Xavier
Disclosed2026-06-29

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.

Key insight
importExternalTexture enforced the cross-origin video taint check on only some paths; adding it to the reused-external-texture fast path and the main path closes the remaining SOP holes.

Attack Path

  1. Load a cross-origin video Load a cross-origin video without CORS so it is origin-tainted.
  2. 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).
  3. Sample and read back Sample the external texture in a shader and read the result into a GPU buffer readable by script.
  4. Exfiltrate cross-origin pixels Recover the cross-origin video’s pixels, defeating the Same-Origin Policy.

Impact Assessment

A cross-origin information disclosure in the WebContent process defeating the Same-Origin Policy for video: uncovered importExternalTexture paths let a page read pixels of a cross-origin video. No memory corruption; the risk is exfiltration of cross-origin visual content (e.g. authenticated video), reliable and stealthy.

Changed Functions

FunctionChangeNotes
GPUDevice::importExternalTexture
Source/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.txt
  • LayoutTests/fast/webgpu/regression/repro_315368.html
  • LayoutTests/fast/webgpu/regression/repro_315368b-expected.txt
  • LayoutTests/fast/webgpu/regression/repro_315368b.html
  • Source/WebCore/Modules/WebGPU/GPUDevice.cpp

Audit Directions

  • All media-ingestion paths
    Audit every importExternalTexture / external-texture reuse and update path (and WebGL video uploads) for a consistent taintsOrigin check.
  • Origin retrieval
    Confirm each path obtains the caller’s security origin (scriptExecutionContext()->securityOrigin()) before importing media.

Original Bug Report

The reporter's bug is still restricted on the tracker.