
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-70609 is a JavaScript injection vulnerability in the Electron framework, formally titled "DevTools JavaScript Injection via Unsanitized Dock State Parameter." The mode option passed to webContents.openDevTools() was not sanitized before being used by the DevTools frontend, allowing attacker-controlled script to execute in the DevTools context. Affected versions include all Electron releases prior to 39.8.7, 40.x before 40.9.0, 41.x before 41.2.0, and 42.x alpha builds before 42.0.0-beta.1. The vulnerability was reported by researcher hackerman70000, published on August 5, 2026, and carries a CVSS v3.1 base score of 5.7 (Medium) (GitHub Advisory).
The root cause is that the internal dock_state_ member — derived from the mode argument of webContents.openDevTools() — was concatenated directly into a JavaScript string and executed via ExecuteJavaScript() in the DevTools context without any validation or escaping (CWE-94: Code Injection; CWE-116: Improper Encoding or Escaping of Output). An attacker who can influence the mode argument, or whose untrusted content can call openDevTools() on an embedded webview, can inject arbitrary JavaScript that runs in the DevTools context. In unsandboxed Electron configurations, the DevTools context has access to Node.js APIs, significantly elevating the impact. The fix validates dock_state_ against an allowlist of four known values (right, bottom, undocked, detach) and falls back to "right" for any unrecognized input (GitHub Advisory, Fix PR #50665).
Successful exploitation allows attacker-controlled JavaScript to execute within the Electron DevTools context. In unsandboxed application configurations, this grants access to Node.js, enabling high-impact confidentiality and integrity compromise — including file system access, credential theft, and arbitrary command execution on the host system. Availability is not directly impacted. Applications that only pass fixed, hardcoded dock mode values are not affected; the risk is scoped to apps that expose openDevTools() to untrusted input or allow untrusted content to call it on embedded webviews (GitHub Advisory).
mode argument of webContents.openDevTools(), or that allows untrusted embedded webview content to call openDevTools().right'; <injected_js>; var x=').openDevTools() with attacker-controlled parameters, or by influencing application logic that passes external data to openDevTools().dock_state_ value is concatenated into a JS string and executed via ExecuteJavaScript() in the DevTools context, running the injected script.mode parameter values (not one of right, bottom, undocked, detach) passed to openDevTools() in application logs or crash reports.curl, wget, scripting interpreters) that are inconsistent with normal application behavior.Electron has released patched versions: 39.8.7, 40.9.0, 41.2.0, and 42.0.0-beta.1. Developers should upgrade to one of these versions immediately. As a workaround for applications that cannot upgrade immediately, only pass fixed, allowlisted values (right, bottom, undocked, detach) as the mode argument to openDevTools(), and never expose openDevTools() to untrusted content or user-controlled input. Applications that already use only hardcoded dock mode values are not affected by this vulnerability (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."