{"id":"CVE-2026-70609","published":"2026-08-05T17:32:21Z","modified":"2026-08-06T03:55:49Z","title":"Electron: DevTools JavaScript Injection via Unsanitized Dock State Parameter","vendor":"electron","product":"electron","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.7,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00532,"percentile":0.45871,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/electron/electron/security/advisories/GHSA-4f78-qhmw-8j8m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/electron/electron/pull/50665","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/pull/50666","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/pull/50667","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/pull/50668","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/commit/04614eed17986bddc43eb509ec870424ee6a47d1","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/commit/2046ae87731d80a7b535512ae19acb529e10e33b","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/commit/969741f9f847c5c583f6bbc63ca22549dbd954ce","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/commit/efc4d3c6b6f1c04f658ca0d9d2512dcfe78eb7ba","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/releases/tag/v39.8.7","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/releases/tag/v40.9.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/releases/tag/v41.2.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/electron/electron/releases/tag/v42.0.0-beta.1","tags":["x_refsource_MISC"]}],"priority":{"score":13.2,"factors":[{"name":"EPSS percentile","points":9.17},{"name":"CVSS severity","points":3.99}]},"vendorSlug":"electron","affectedVersions":[{"vendor":"electron","product":"electron","versions":["< 39.8.7",">= 40.0.0-alpha.1, < 40.9.0",">= 41.0.0-alpha.1, < 41.2.0",">= 42.0.0-alpha.1, < 42.0.0-beta.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-08-05T00:00:00+00:00","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"electron","vulnerableRanges":["<39.8.7",">=40.0.0-alpha.1, <40.9.0",">=41.0.0-alpha.1, <41.2.0",">=42.0.0-alpha.1, <42.0.0-beta.1"],"patched":["39.8.7","40.9.0","41.2.0","42.0.0-beta.1"],"from":["GHSA-4f78-qhmw-8j8m"],"provenance":"source"}],"summary":{"text":"The flaw is in Electron's webContents.openDevTools() API, where the mode option is passed to the DevTools frontend without sanitization, which allows code injection. An attacker who can influence the mode value, whether through untrusted input reaching that argument or untrusted content calling openDevTools() on an embedded webview, can run script in the DevTools context, which has Node.js access in unsandboxed configurations, and this requires user interaction and an application that exposes those paths.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:47:12Z"},"euvd":{"id":"EUVD-2026-53566","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-electron-cve-2026-70609","children":[{"from":"CVE-2026-70609","to":"CVE-2026-70611","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["shell/browser/ui/inspectable_web_contents.cc"],"commits":["https://github.com/electron/electron/commit/04614eed17986bddc43eb509ec870424ee6a47d1","https://github.com/electron/electron/commit/2046ae87731d80a7b535512ae19acb529e10e33b","https://github.com/electron/electron/commit/10fb5b39c5287f70c4bbcab4c24197f3871ec322","https://github.com/electron/electron/commit/1b8a298d629d5a642c816ea5f7505359de17b771"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2026-34765","published":"2026-04-07","fixed":"42.0.0-alpha.5","kev":false,"link":{"from":"CVE-2026-34765","to":"CVE-2026-70609","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:electron","fromFixed":"42.0.0-alpha.5","toFixed":"42.0.0-beta.1","daysApart":120}]}},{"cve":"CVE-2026-34781","published":"2026-04-07","fixed":"42.0.0-alpha.5","kev":false},{"cve":"CVE-2026-70599","published":"2026-08-05","fixed":"42.0.0-beta.1","kev":false},{"cve":"CVE-2026-70603","published":"2026-08-05","fixed":"42.0.0-beta.1","kev":false,"link":{"from":"CVE-2026-70603","to":"CVE-2026-70609","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:electron","fromFixed":"39.8.6","toFixed":"39.8.7","daysApart":0},{"kind":"version-step","provenance":"source","package":"npm:electron","fromFixed":"41.1.1","toFixed":"41.2.0","daysApart":0}]}},{"cve":"CVE-2026-70609","published":"2026-08-05","fixed":"42.0.0-beta.1","kev":false},{"cve":"CVE-2026-102672","published":"2026-10-13","fixed":"42.0.0-beta.2","kev":false,"link":{"from":"CVE-2026-70609","to":"CVE-2026-102672","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:electron","fromFixed":"42.0.0-beta.1","toFixed":"42.0.0-beta.2","daysApart":69}]}},{"cve":"CVE-2026-70597","published":"2026-08-05","fixed":"42.0.0-beta.3","kev":false},{"cve":"CVE-2026-70598","published":"2026-08-05","fixed":"42.0.0-beta.3","kev":false}],"package":"npm:electron"}}