Summary
Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter
Advisory details
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 security@electronjs.org
References
- https://github.com/advisories/GHSA-4f78-qhmw-8j8m
- https://github.com/electron/electron/security/advisories/GHSA-4f78-qhmw-8j8m
- https://github.com/electron/electron/pull/50665
- https://github.com/electron/electron/pull/50666
- https://github.com/electron/electron/pull/50667
- https://github.com/electron/electron/pull/50668
- https://github.com/electron/electron/commit/04614eed17986bddc43eb509ec870424ee6a47d1
- https://github.com/electron/electron/commit/2046ae87731d80a7b535512ae19acb529e10e33b
Related vulnerabilities
All Supply chain →- CRITICALCVE-2026-62681
Orval: RCE via OpenAPI path -> unescaped request-URL template literal (backtick breakout)
- CRITICALCVE-2026-62682
Orval: RCE via servers[].url -> unescaped request-URL template literal (with getBaseUrlFromSpecification)
- CRITICALCVE-2026-72717
Orval: Import-time RCE via schema default -> zod module-level template literal
- CRITICALCVE-2026-71869
Orval: Import-time RCE via array-items default -> zod module-level template literal
- CRITICALCVE-2026-71871
Orval: Import-time RCE via header-parameter default -> zod module-level template literal
- CRITICALCVE-2026-71865
Orval: Import-time RCE via query parameter name -> computed-property-key injection in the zod cli