Electron: Context Isolation bypass via contextBridge VideoFrame transfer
Package
Affected versions
>= 39.0.0-alpha.1, < 39.8.0
>= 40.0.0-alpha.1, < 40.7.0
>= 41.0.0-alpha.1, < 41.0.0-beta.8
Patched versions
39.8.0
40.7.0
41.0.0-beta.8
Description
Published to the GitHub Advisory Database
Apr 3, 2026
Reviewed
Apr 3, 2026
Published by the National Vulnerability Database
Apr 4, 2026
Last updated
Apr 6, 2026
Impact
Apps that pass
VideoFrameobjects (from the WebCodecs API) across thecontextBridgeare vulnerable to a context isolation bypass. An attacker who can execute JavaScript in the main world (for example, via XSS) can use a bridgedVideoFrameto gain access to the isolated world, including any Node.js APIs exposed to the preload script.Apps are only affected if a preload script returns, resolves, or passes a
VideoFrameobject to the main world viacontextBridge.exposeInMainWorld(). Apps that do not bridgeVideoFrameobjects are not affected.Workarounds
Do not pass
VideoFrameobjects acrosscontextBridge. If an app needs to transfer video frame data, serialize it to anArrayBufferorImageBitmapbefore bridging.Fixed Versions
41.0.0-beta.840.7.039.8.0For more information
If there are any questions or comments about this advisory, please email security@electronjs.org
References