Medium CVSS 8.1 webkit Cross Origin 🔧 Commit mapped

Overview

Medium
Severity
8.1
CVSS
No
Exploited ITW
Fixed
Fix Status
DescriptionA malicious website may exfiltrate data cross-origin
ComponentWebCore WebGPU
Bug ClassCross Origin
Tracker313357
Fix commit8254b44eba7e (WebKit/WebKit) +103/-3
CWECWE-352 (CSRF)
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
CISA KEVNot listed
CreditedRhyru9, Merrick Hare, Kwak Kiyong, Song Nuri, Khai Tran, John Lussier, Gurpreet Shergill, Drinor Selmanaj (Sentry)
Disclosed2026-06-29

Background

Same-Origin Policy (SOP)
The core web isolation rule preventing one origin from reading another origin’s content without permission (CORS).
Origin taint
Media loaded cross-origin without CORS is ’tainted’; the pixels may be displayed but must not be read back. Canvas enforces this by throwing on getImageData().
importExternalTexture
A WebGPU API that ingests an HTMLVideoElement’s frames as a texture usable in shaders — a path that, if unchecked, lets shader output be read back to script.

Root Cause Analysis

This fixes a cross-origin data leak in WebGPU’s importExternalTexture.

Before the fix, GPUDevice::importExternalTexture accepted an HTMLVideoElement source without checking whether the video is origin-tainted (cross-origin without CORS). A page could therefore import a cross-origin, CORS-tainted video as a WebGPU external texture, sample it in a shader, and read the result back through a GPU buffer — exfiltrating pixels of a cross-origin video that the Same-Origin Policy is meant to keep unreadable (the same protection canvas enforces by throwing on getImageData for tainted content).

The fix threads the ScriptExecutionContext into importExternalTexture ([CallWith=CurrentScriptExecutionContext] in the IDL, new parameter in the .h/.cpp) and, before importing, checks (*videoElement)->taintsOrigin(context.securityOrigin()); if the video would taint the caller’s origin it returns a SecurityError (‘Cross origin external videos are not allowed in WebGPU’) instead of importing.

The restored invariant is that only same-origin (or CORS-approved) video pixels can enter the WebGPU pipeline, matching canvas taint rules. The layout test confirms importExternalTexture throws SecurityError for a cross-origin tainted video. Established by the diff.

Key insight
WebGPU’s importExternalTexture was a new pixel-ingestion path that never learned the taint rule canvas already enforces. The fix threads the caller’s ScriptExecutionContext (and thus security origin) into the import and rejects tainted video with a SecurityError — closing an SOP hole opened by a newer API surface.

Attack Path

  1. Load a cross-origin video without CORS The page creates a <video> whose src is a cross-origin URL and no crossorigin attribute, so it becomes origin-tainted.
  2. Import it as a WebGPU external texture Pre-patch, device.importExternalTexture({source: video}) accepts the tainted video with no origin check.
  3. Sample and read back the pixels A compute/render shader samples the external texture and writes results to a GPU buffer the page can map and read.
  4. Exfiltrate cross-origin video content The page reads back pixel-derived data from the cross-origin video, defeating the Same-Origin Policy (now blocked with a SecurityError).

Impact Assessment

A cross-origin information disclosure that defeats the Same-Origin Policy for video content. An attacker page can read the pixels of any cross-origin video the victim can load (e.g. authenticated video behind a session), exfiltrating frames that SOP is designed to keep unreadable. No memory corruption is needed — the leak is purely a policy bypass, which makes it reliable and stealthy.

Changed Functions

FunctionChangeNotes
GPUDevice::importExternalTexture
Source/WebCore/Modules/WebGPU/GPUDevice.cpp
modified Takes a ScriptExecutionContext and rejects the import with a SecurityError when the source video taintsOrigin(context.securityOrigin()), preventing cross-origin tainted video from entering WebGPU.
GPUDevice::importExternalTexture (declaration)
Source/WebCore/Modules/WebGPU/GPUDevice.h
modified Signature adds the ScriptExecutionContext& parameter.
GPUDevice.importExternalTexture (IDL)
Source/WebCore/Modules/WebGPU/GPUDevice.idl
modified Adds [CallWith=CurrentScriptExecutionContext] so the caller's execution context (and thus security origin) is available for the taint check.

Files Changed

  • LayoutTests/http/tests/webgpu/import-external-texture-cross-origin-video-expected.txt
  • LayoutTests/http/tests/webgpu/import-external-texture-cross-origin-video.html
  • Source/WebCore/Modules/WebGPU/GPUDevice.cpp
  • Source/WebCore/Modules/WebGPU/GPUDevice.h
  • Source/WebCore/Modules/WebGPU/GPUDevice.idl

Audit Directions

  • New media-ingestion APIs vs. taint
    Audit every WebGPU/WebGL entry point that accepts an HTMLVideoElement, HTMLImageElement, or canvas for a taintsOrigin() check equivalent to canvas’s; new GPU surfaces are the likeliest to miss it.
  • Origin plumbing
    Verify IDL methods that need the caller origin actually receive the execution context (e.g. [CallWith=CurrentScriptExecutionContext]) rather than inferring same-origin.

Original Bug Report

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