{"id":"CVE-2026-70609","aliases":["EUVD-2026-53566","GHSA-4f78-qhmw-8j8m"],"status":"published","title":"Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter","description":"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.","severity":{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00532,"percentile":0.45417,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-116","CWE-94"],"published":"2026-08-05T17:32:21Z","modified":"2026-10-28T10:55:17Z","fixes":[{"ecosystem":"npm","package":"electron","fixed_in":["39.8.7","40.9.0","41.2.0","42.0.0-beta.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"electron","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"39.8.7"}]}]},{"source":"ghsa","ecosystem":"npm","package":"electron","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"40.0.0-alpha.1"},{"fixed":"40.9.0"}]}]},{"source":"ghsa","ecosystem":"npm","package":"electron","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"41.0.0-alpha.1"},{"fixed":"41.2.0"}]}]},{"source":"ghsa","ecosystem":"npm","package":"electron","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"42.0.0-alpha.1"},{"fixed":"42.0.0-beta.1"}]}]},{"source":"osv","ecosystem":"npm","package":"electron","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"39.8.7"}]}]},{"source":"osv","ecosystem":"npm","package":"electron","ranges":[{"type":"SEMVER","events":[{"introduced":"40.0.0-alpha.1"},{"fixed":"40.9.0"}]}]},{"source":"osv","ecosystem":"npm","package":"electron","ranges":[{"type":"SEMVER","events":[{"introduced":"41.0.0-alpha.1"},{"fixed":"41.2.0"}]}]},{"source":"osv","ecosystem":"npm","package":"electron","ranges":[{"type":"SEMVER","events":[{"introduced":"42.0.0-alpha.1"},{"fixed":"42.0.0-beta.1"}]}]}],"products":[{"vendor":"electron","product":"electron"},{"vendor":"electronjs","product":"electron"}],"references":[{"url":"https://github.com/electron/electron/security/advisories/GHSA-4f78-qhmw-8j8m","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/electron/electron/pull/50665","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/electron/electron/pull/50666","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/electron/electron/pull/50667","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/electron/electron/pull/50668","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/electron/electron/commit/04614eed17986bddc43eb509ec870424ee6a47d1","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/electron/electron/commit/2046ae87731d80a7b535512ae19acb529e10e33b","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/electron/electron/commit/969741f9f847c5c583f6bbc63ca22549dbd954ce","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/electron/electron/commit/efc4d3c6b6f1c04f658ca0d9d2512dcfe78eb7ba","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/electron/electron/releases/tag/v39.8.7","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/electron/electron/releases/tag/v40.9.0","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/electron/electron/releases/tag/v41.2.0","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/electron/electron/releases/tag/v42.0.0-beta.1","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/advisories/GHSA-4f78-qhmw-8j8m"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70609.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-70609","tags":["advisory"]},{"url":"https://github.com/electron/electron","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-70609","title":"Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter","description":"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.","status":"published","published":"2026-08-05T17:32:21.067Z","modified":"2026-08-06T03:55:49.348Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-94","CWE-116"],"updated_at":"2026-11-02T13:35:22.169514Z"}],"euvd":[{"id":"EUVD-2026-53566","description":"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.","status":"published","published":"2026-08-05T17:32:21Z","modified":"2026-08-06T03:55:49Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T18:02:09.043832Z"}],"ghsa":[{"id":"GHSA-4f78-qhmw-8j8m","title":"Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter","description":"### Impact\nThe `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.\n\nApps are only affected if untrusted input can reach the `mode` argument of `openDevTools()`, or if untrusted content can call `openDevTools()` on a `\u003cwebview\u003e` it embeds. Apps that only ever pass a fixed dock mode are not affected.\n\n### Workarounds\nOnly pass fixed, allowlisted values (`right`, `bottom`, `undocked`, `detach`) as the DevTools `mode`, and do not expose `openDevTools` to untrusted content.\n\n### Fixed Versions\n* `42.0.0-beta.1`\n* `41.2.0`\n* `40.9.0`\n* `39.8.7`\n\n### For more information\nIf you have any questions or comments about this advisory, email Electron at [security@electronjs.org](mailto:security@electronjs.org)","status":"published","published":"2026-08-05T17:32:47Z","modified":"2026-08-05T17:32:47Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","level":"medium"}],"cwes":["CWE-94","CWE-116"],"updated_at":"2026-11-02T14:40:56.852119Z"}],"nvd":[{"id":"CVE-2026-70609","description":"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.","status":"published","published":"2026-08-05T18:17:15.307Z","modified":"2026-10-08T13:53:24.357Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-94","CWE-116"],"updated_at":"2026-11-02T14:12:35.031043Z"}],"osv":[{"id":"CVE-2026-70609","title":"Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter","description":"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.","status":"published","published":"2026-08-05T17:32:21.067Z","modified":"2026-10-28T10:55:17.466404622Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","level":"medium"}],"cwes":["CWE-116","CWE-94"],"updated_at":"2026-11-02T15:45:15.164658Z"},{"id":"GHSA-4f78-qhmw-8j8m","title":"Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter","description":"### Impact\nThe `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.\n\nApps are only affected if untrusted input can reach the `mode` argument of `openDevTools()`, or if untrusted content can call `openDevTools()` on a `\u003cwebview\u003e` it embeds. Apps that only ever pass a fixed dock mode are not affected.\n\n### Workarounds\nOnly pass fixed, allowlisted values (`right`, `bottom`, `undocked`, `detach`) as the DevTools `mode`, and do not expose `openDevTools` to untrusted content.\n\n### Fixed Versions\n* `42.0.0-beta.1`\n* `41.2.0`\n* `40.9.0`\n* `39.8.7`\n\n### For more information\nIf you have any questions or comments about this advisory, email Electron at [security@electronjs.org](mailto:security@electronjs.org)","status":"published","published":"2026-08-05T17:32:47Z","modified":"2026-08-20T05:15:07.17474369Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","level":"medium"}],"cwes":["CWE-116","CWE-94"],"updated_at":"2026-11-02T15:46:36.782754Z"}]}}
