electron
Affected
- introduced
0, fixed39.8.7(semver)
Fixed versions
39.8.7
Fix
- Fixed version
39.8.7npm install [email protected]
Advisory
Also known as: CVE-2026-70609
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.7For more information
If you have any questions or comments about this advisory, email Electron at [[email protected]](mailto:[email protected])
Medium Basis: The source's own band: MODERATE
0, fixed 39.8.7 (semver)39.8.7
39.8.7npm install [email protected]40.0.0-alpha.1, fixed 40.9.0 (semver)40.9.0
40.9.0npm install [email protected]41.0.0-alpha.1, fixed 41.2.0 (semver)41.2.0
41.2.0npm install [email protected]42.0.0-alpha.1, fixed 42.0.0-beta.1 (semver)42.0.0-beta.1
42.0.0-beta.1npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0