Improper Encoding or Escaping of Output Affecting electron package, versions <39.8.7>=40.0.0-alpha.2 <40.9.1>=41.0.0-alpha.1 <41.2.0>=42.0.0-alpha.1 <42.0.0-beta.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.32% (25th 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-18565023
  • published6 Aug 2026
  • disclosed5 Aug 2026
  • creditBartłomiej Dmitruk

Introduced: 5 Aug 2026

NewCVE-2026-70609  (opens in a new tab)
CWE-116  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade electron to version 39.8.7, 40.9.1, 41.2.0, 42.0.0-beta.1 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 Improper Encoding or Escaping of Output via the mode parameter of the openDevTools function. An attacker can execute arbitrary JavaScript code in the DevTools context by supplying unsanitized input to this parameter, potentially gaining access to Node.js APIs if the application is running in an unsandboxed configuration.

Note: This is only exploitable if untrusted input can reach the mode argument of openDevTools() or if untrusted content can call openDevTools() on an embedded <webview>.

Workaround

This vulnerability can be mitigated by only passing fixed, allowlisted values (right, bottom, undocked, detach) as the DevTools mode, and by not exposing openDevTools to untrusted content.

CVSS Base Scores

version 4.0
version 3.1