Severity by source
AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
Webview-embedded content requires no elevated privileges (PR:N), unsandboxed Node.js access from DevTools constitutes a scope change to the host (S:C), and AC:H reflects the non-default unsandboxed configuration prerequisite.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
3DescriptionCVE.org
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.
AnalysisAI
Code injection in Electron's DevTools API permits arbitrary script execution in the DevTools context via an unsanitized mode parameter supplied to webContents.openDevTools(). Unsandboxed Electron applications where untrusted input reaches the mode argument - or where untrusted content embedded in a <webview> element can invoke openDevTools() - are exposed to full Node.js-level code execution on the host operating system. No public exploit has been identified at time of analysis, but Electron's own GitHub Security Advisory (GHSA-4f78-qhmw-8j8m) confirms the flaw and vendor-released patches are available across all active release tracks.
Technical ContextAI
Electron is a cross-platform desktop application framework that co-embeds Chromium (for web rendering) and Node.js (for system access). The vulnerability originates in shell/browser/ui/inspectable_web_contents.cc, specifically InspectableWebContents::SetDockState() and the LoadCompleted() path. The mode option of webContents.openDevTools() controls how the DevTools panel docks (right, bottom, undocked, detach) and was passed directly, without an allowlist check, to the Chromium DevTools frontend JavaScript environment. Because this value is treated as data but reaches a JavaScript context that can interpret it as code, the root cause is CWE-94 (Improper Control of Generation of Code / Code Injection). The critical amplifier is that Electron's DevTools context, unlike a normal renderer, retains direct Node.js API access when the app runs unsandboxed - meaning code executing there can perform filesystem I/O, spawn child processes, and make network calls at the OS level. CPE: cpe:2.3:a:electron:electron:*:*:*:*:*:*:*:*.
RemediationAI
Upgrade Electron to a fixed version matching your active release track: 39.8.7 (https://github.com/electron/electron/releases/tag/v39.8.7), 40.9.0 (https://github.com/electron/electron/releases/tag/v40.9.0), 41.2.0 (https://github.com/electron/electron/releases/tag/v41.2.0), or 42.0.0-beta.1 (https://github.com/electron/electron/releases/tag/v42.0.0-beta.1). The patch in PRs #50665-50668 adds a compile-time kValidDockStates allowlist (bottom, left, right, undocked) to inspectable_web_contents.cc and defaults to 'right' on invalid input, eliminating the injection surface entirely. Where patching is not immediately possible, apply the documented workaround: only pass fixed allowlisted string literals ('right', 'bottom', 'undocked', 'detach') as the mode argument to openDevTools(), and never expose the openDevTools API to or allow it to be called by untrusted web content or webview-embedded pages. If DevTools are not required in production builds, setting webPreferences.devTools: false eliminates the attack surface without functional trade-offs for end users.
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
The JS-YAML module before 2.0.5 for Node.js parses input without properly considering the unsafe !!js/function tag, whic
The AES-NI implementation in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h does not consider memory allocation during a
Same weakness CWE-94 – Code Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-53566
GHSA-4f78-qhmw-8j8m