Insecure Default Initialization of Resource Affecting electron package, versions >=39.0.0-alpha.1 <39.8.0>=40.0.0-alpha.2 <40.7.0>=41.0.0-alpha.1 <41.0.0-beta.8


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-ELECTRON-15875855
  • published3 Apr 2026
  • disclosed3 Apr 2026
  • creditUnknown

Introduced: 3 Apr 2026

NewCVE-2026-34780  (opens in a new tab)
CWE-1188  (opens in a new tab)
CWE-668  (opens in a new tab)

How to fix?

Upgrade electron to version 39.8.0, 40.7.0, 41.0.0-beta.8 or higher.

Overview

electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.

Affected versions of this package are vulnerable to Insecure Default Initialization of Resource in the transfer of VideoFrame objects via contextBridge. An attacker can gain access to the isolated world, including any Node.js APIs exposed to the preload script, by executing JavaScript in the main world and leveraging a bridged VideoFrame object.

Note:

This is only exploitable if a preload script returns, resolves, or passes a VideoFrame object to the main world via contextBridge.exposeInMainWorld().

Workaround

This vulnerability can be mitigated by not passing VideoFrame objects across contextBridge and instead serializing video frame data to an ArrayBuffer or ImageBitmap before bridging.

CVSS Base Scores

version 4.0
version 3.1