CVE-2026-70609
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.
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
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 Medium
CVSS: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 Medium
CVSS: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.141.2.040.9.039.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 Medium
CVSS: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 Medium
CVSS: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 Medium
CVSS: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.141.2.040.9.039.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 Medium
CVSS: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
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE 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
github.com/electron/electron/security/advisories/GHSA-4f78-qhmw-8j8m
github.com/electron/electron/pull/50665
github.com/electron/electron/pull/50666
github.com/electron/electron/pull/50667
github.com/electron/electron/pull/50668
github.com/electron/electron/commit/04614eed17986bddc43eb509ec870424ee6a47d1
Show 11 moreShow less
github.com/electron/electron/commit/2046ae87731d80a7b535512ae19acb529e10e33b
github.com/electron/electron/commit/969741f9f847c5c583f6bbc63ca22549dbd954ce
github.com/electron/electron/commit/efc4d3c6b6f1c04f658ca0d9d2512dcfe78eb7ba
github.com/electron/electron/releases/tag/v39.8.7
github.com/electron/electron/releases/tag/v40.9.0
github.com/electron/electron/releases/tag/v41.2.0
github.com/electron/electron/releases/tag/v42.0.0-beta.1
github.com/advisories/GHSA-4f78-qhmw-8j8m
github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70609.json
nvd.nist.gov/vuln/detail/CVE-2026-70609
github.com/electron/electron