Description
Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. From versions 39.0.0-alpha.1 to before 39.8.0, 40.0.0-alpha.1 to before 40.7.0, and 41.0.0-alpha.1 to before 41.0.0-beta.8, apps that pass VideoFrame objects (from the WebCodecs API) across the contextBridge are vulnerable to a context isolation bypass. An attacker who can execute JavaScript in the main world (for example, via XSS) can use a bridged VideoFrame to 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 VideoFrame object to the main world via contextBridge.exposeInMainWorld(). Apps that do not bridge VideoFrame objects are not affected. This issue has been patched in versions 39.8.0, 40.7.0, and 41.0.0-beta.8.
Published: 2026-04-04
Score: 8.4 High
EPSS: < 1% Very Low
KEV: No
Impact: Node.js API Exposure
Action: Patch Immediately
AI Analysis

Impact

Electron applications that use the WebCodecs API can expose VideoFrame objects to the main world via contextBridge.exposeInMainWorld(). This vulnerability creates a context isolation bypass, allowing an attacker who has already injected JavaScript into the renderer process to access the isolated preload world and any Node.js APIs available there. The weakness is captured by CWE‑1188 (Insecure Deserialization), CWE‑501 (Uncontrolled Input), and CWE‑668 (Privilege‑Related Configuration Error), indicating that the bypass stems from insecure handling of data, improper input validation, and inadequate restriction of privileged operations.

Affected Systems

Electron versions 39.0.0-alpha.1 through 39.7.x, 40.0.0-alpha.1 through 40.6.x, and 41.0.0-alpha.1 through 41.0.0-beta.7 are impacted when a preload script returns, resolves, or passes a VideoFrame object to the main world via contextBridge.exposeInMainWorld(). Versions 39.8.0, 40.7.0, and 41.0.0-beta.8 and later are patched and not affected. Applications that do not bridge VideoFrame objects are not vulnerable.

Risk and Exploitability

The CVSS score of 8.4 signals a high‑severity vulnerability. Exploitation requires that the attacker first execute JavaScript in the renderer, typically through an XSS flaw, and then leverage the bridged VideoFrame to traverse the isolation boundary. The EPSS score is below 1%, suggesting a low probability of current exploitation, and the vulnerability is not listed in the CISA KEV catalog. Once an attack vector is available, the bypass effectively elevates an XSS incident into full access to Node.js APIs, enabling data theft, modification, or arbitrary code execution within the application.

Generated by OpenCVE AI on April 14, 2026 at 21:32 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Electron to 39.8.0, 40.7.0, 41.0.0-beta.8, or later releases.
  • Remove any usage of contextBridge.exposeInMainWorld() that passes VideoFrame objects from preload scripts.
  • Limit preload scripts to expose only strictly necessary APIs and avoid peripheral Node.js exposure.
  • Validate that your application does not return or resolve VideoFrame objects to the main world when not required.
  • Mitigate potential XSS vulnerabilities to prevent initial renderer JavaScript injection.

Generated by OpenCVE AI on April 14, 2026 at 21:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-jfqg-hf23-qpw2 Electron: Context Isolation bypass via contextBridge VideoFrame transfer
History

Tue, 14 Apr 2026 19:15:00 +0000

Type Values Removed Values Added
First Time appeared Electronjs
Electronjs electron
CPEs cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha1:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha2:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha3:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha4:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha5:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:alpha6:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta1:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta2:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta3:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta4:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta5:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta6:*:*:*:node.js:*:*
cpe:2.3:a:electronjs:electron:41.0.0:beta7:*:*:*:node.js:*:*
Vendors & Products Electronjs
Electronjs electron

Tue, 07 Apr 2026 00:00:00 +0000

Type Values Removed Values Added
First Time appeared Electron
Electron electron
Weaknesses CWE-501
Vendors & Products Electron
Electron electron
References
Metrics threat_severity

None

threat_severity

Important


Mon, 06 Apr 2026 16:45:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Sat, 04 Apr 2026 01:15:00 +0000

Type Values Removed Values Added
Description Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. From versions 39.0.0-alpha.1 to before 39.8.0, 40.0.0-alpha.1 to before 40.7.0, and 41.0.0-alpha.1 to before 41.0.0-beta.8, apps that pass VideoFrame objects (from the WebCodecs API) across the contextBridge are vulnerable to a context isolation bypass. An attacker who can execute JavaScript in the main world (for example, via XSS) can use a bridged VideoFrame to 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 VideoFrame object to the main world via contextBridge.exposeInMainWorld(). Apps that do not bridge VideoFrame objects are not affected. This issue has been patched in versions 39.8.0, 40.7.0, and 41.0.0-beta.8.
Title Electron: Context Isolation bypass via contextBridge VideoFrame transfer
Weaknesses CWE-1188
CWE-668
References
Metrics cvssV3_1

{'score': 8.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H'}


Subscriptions

Electron Electron
Electronjs Electron
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-04-08T03:55:42.004Z

Reserved: 2026-03-30T19:54:55.556Z

Link: CVE-2026-34780

cve-icon Vulnrichment

Updated: 2026-04-06T15:49:17.194Z

cve-icon NVD

Status : Analyzed

Published: 2026-04-04T01:16:39.540

Modified: 2026-04-14T19:02:23.427

Link: CVE-2026-34780

cve-icon Redhat

Severity : Important

Publid Date: 2026-04-04T00:02:02Z

Links: CVE-2026-34780 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-15T16:30:09Z

Weaknesses