Every CVE Search/ Get API key

CVE-2026-70609

Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter

5.7 MediumFix available

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1, the mode option of webContents.openDevTools() was not sanitized before use by the DevTools frontend. If an attacker can influence this value, script under their control may run in the DevTools context, which in unsandboxed configurations has access to Node.js, including when untrusted input reaches the mode argument of openDevTools() or untrusted content calls openDevTools() on a webview it embeds. This issue is fixed in 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
High
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
None

Exploit likelihood

0.53%Up 0.2 points since Aug 6, 2026
90%50%10%1%

What each source reports

CVE List Score used 5.7

Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1, the mode option of webContents.openDevTools() was not sanitized before use by the DevTools frontend. If an attacker can influence this value, script under their control may run in the DevTools context, which in unsandboxed configurations has access to Node.js, including when untrusted input reaches the mode argument of openDevTools() or untrusted content calls openDevTools() on a webview it embeds. This issue is fixed in 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1.

Record
CVE-2026-70609
CVSS 3.1
5.7 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-94, CWE-116
Updated
2026-11-02
EUVDEUVD-2026-53566 5.7

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1, the mode option of webContents.openDevTools() was not sanitized before use by the DevTools frontend. If an attacker can influence this value, script under their control may run in the DevTools context, which in unsandboxed configurations has access to Node.js, including when untrusted input reaches the mode argument of openDevTools() or untrusted content calls openDevTools() on a webview it embeds. This issue is fixed in 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1.

Record
EUVD-2026-53566
CVSS 3.1
5.7 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-4f78-qhmw-8j8m 5.7

Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter

Impact

The mode option of webContents.openDevTools() was not sanitized before use by the DevTools frontend. If an attacker can influence this value, script under their control may run in the DevTools context, which in unsandboxed configurations has access to Node.js.

Apps are only affected if untrusted input can reach the mode argument of openDevTools(), or if untrusted content can call openDevTools() on a <webview> it embeds. Apps that only ever pass a fixed dock mode are not affected.

Workarounds

Only pass fixed, allowlisted values (right, bottom, undocked, detach) as the DevTools mode, and do not expose openDevTools to untrusted content.

Fixed Versions

  • 42.0.0-beta.1
  • 41.2.0
  • 40.9.0
  • 39.8.7

For more information

If you have any questions or comments about this advisory, email Electron at [email protected]

Record
GHSA-4f78-qhmw-8j8m
CVSS 3.1
5.7 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-94, CWE-116
Updated
2026-11-02
NVD 5.7

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1, the mode option of webContents.openDevTools() was not sanitized before use by the DevTools frontend. If an attacker can influence this value, script under their control may run in the DevTools context, which in unsandboxed configurations has access to Node.js, including when untrusted input reaches the mode argument of openDevTools() or untrusted content calls openDevTools() on a webview it embeds. This issue is fixed in 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1.

Record
CVE-2026-70609
CVSS 3.1
5.7 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-94, CWE-116
Updated
2026-11-02
OSV 5.7

Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1, the mode option of webContents.openDevTools() was not sanitized before use by the DevTools frontend. If an attacker can influence this value, script under their control may run in the DevTools context, which in unsandboxed configurations has access to Node.js, including when untrusted input reaches the mode argument of openDevTools() or untrusted content calls openDevTools() on a webview it embeds. This issue is fixed in 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1.

Record
CVE-2026-70609
CVSS 3.1
5.7 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-116, CWE-94
Updated
2026-11-02
OSVGHSA-4f78-qhmw-8j8m 5.7

Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter

Impact

The mode option of webContents.openDevTools() was not sanitized before use by the DevTools frontend. If an attacker can influence this value, script under their control may run in the DevTools context, which in unsandboxed configurations has access to Node.js.

Apps are only affected if untrusted input can reach the mode argument of openDevTools(), or if untrusted content can call openDevTools() on a <webview> it embeds. Apps that only ever pass a fixed dock mode are not affected.

Workarounds

Only pass fixed, allowlisted values (right, bottom, undocked, detach) as the DevTools mode, and do not expose openDevTools to untrusted content.

Fixed Versions

  • 42.0.0-beta.1
  • 41.2.0
  • 40.9.0
  • 39.8.7

For more information

If you have any questions or comments about this advisory, email Electron at [email protected]

Record
GHSA-4f78-qhmw-8j8m
CVSS 3.1
5.7 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-116, CWE-94
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
electron
npm
before 39.8.7
39.8.7
electron
npm
40.0.0-alpha.1 up to 40.9.0
40.9.0
electron
npm
41.0.0-alpha.1 up to 41.2.0
41.2.0
electron
npm
42.0.0-alpha.1 up to 42.0.0-beta.1
42.0.0-beta.1

History

History
RecordedChangedSources
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-70609 is a medium vulnerability (CVSS 5.7) in Electron, published August 5, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.53%, the 45th percentile. Fixed in electron 39.8.7.

References

Show 11 moreShow less
MoveEnter Open