CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-70611

CVE-2026-70611: Sandbox Escape and Command Execution via DevTools Shell Integration in Electron

Alon Barad
Alon Barad
Software Engineer

Aug 5, 2026·6 min read·113 visits

Executive Summary (TL;DR)

Unsanitized file paths sent via DevTools IPC to the main process can trigger arbitrary code execution by exploiting OS shell file launching handlers.

A high-severity sandbox escape and arbitrary command execution vulnerability exists in the Electron desktop framework prior to versions 39.8.9, 40.9.2, 41.2.1, and 42.0.0-beta.3. The flaw lies in the handling of DevTools embedder messages during file manager reveal actions, allowing an attacker to execute arbitrary binaries with main process privileges.

Vulnerability Overview

The Electron desktop application framework combines Chromium and Node.js, allowing developers to build desktop applications using web technologies. To facilitate debugging and web inspection, Electron incorporates the Chromium DevTools interface. This interface interacts with the browser's main process via specialized IPC messages handled by the DevTools embedder.\n\nThe vulnerability, tracked as CVE-2026-70611, exists in the DevTools embedder message handler for the 'reveal in file manager' action, specifically within the showItemInFolder routine. Under normal conditions, this handler is meant to open the parent directory of a file and highlight it in the system file explorer.\n\nIf an attacker can execute arbitrary JavaScript within the context of the DevTools frontend, they can invoke this message handler with an arbitrary file path. Due to insufficient sanitization, the handler can be manipulated to execute arbitrary executable files on the local host. This execution occurs with the privileges of the main process, entirely bypassing the Chromium renderer sandbox.

Root Cause Analysis

The root cause of this vulnerability lies in a structural design flaw within the InspectableWebContents::ShowItemInFolder method. When a request to highlight an item is received, the system extracts the directory portion of the path using the DirName() method of base::FilePath. It then attempts to open the directory first using platform_util::OpenPath, which subsequently completes and invokes platform_util::ShowItemInFolder.\n\nBecause the input path is entirely user-controlled, an attacker can append a dummy path component to a target executable file path. For example, a Unix path such as /bin/sh/dummy_component yields /bin/sh when evaluated by DirName(). Similarly, on Windows, C:\\Windows\\System32\\cmd.exe\\dummy_component yields C:\\Windows\\System32\\cmd.exe when the trailing component is stripped.\n\nThe resulting path is subsequently passed directly to platform_util::OpenPath. Instead of opening a folder, this function relies on operating system shell handlers, such as ShellExecute on Windows or xdg-open on Linux, to process the path. When an executable path is passed to these handlers instead of a directory path, the operating system launches the binary as a new process.\n\nmermaid\ngraph LR\n A["Attacker Input Path"] --> B["base::FilePath::DirName()"]\n B --> C["Extracted Executable Path"]\n C --> D["platform_util::OpenPath()"]\n D --> E["Operating System Shell"]\n E --> F["Arbitrary Process Execution"]\n

Code Analysis and Vulnerability Patch

A direct comparison of the vulnerable and patched code reveals how the logic was refactored to eliminate the command execution vector. In vulnerable versions of Electron, the handler was structured as follows within shell/browser/ui/inspectable_web_contents.cc:\n\ncpp\n// Vulnerable Implementation\nvoid InspectableWebContents::ShowItemInFolder(\n const std::string& file_system_path) {\n if (!pref_service_)\n return;\n\n base::FilePath path = base::FilePath::FromUTF8Unsafe(file_system_path);\n // VULNERABLE: Invokes platform_util::OpenPath on the parent directory path\n // If path is an executable with a dummy file suffix, this runs the executable\n platform_util::OpenPath(path.DirName(),\n base::BindOnce(&OnOpenItemComplete, path));\n}\n\n\nThe corresponding patch removes the call to platform_util::OpenPath and implements strict validation against the configured DevTools workspaces before calling platform_util::ShowItemInFolder directly:\n\ncpp\n// Patched Implementation\nvoid InspectableWebContents::ShowItemInFolder(\n const std::string& file_system_path) {\n if (!pref_service_)\n return;\n \n base::FilePath path = base::FilePath::FromUTF8Unsafe(file_system_path);\n\n // Only reveal paths that fall under a DevTools workspace folder the user has\n // explicitly added. The DevTools frontend is renderer-hosted and may be\n // attacker-controlled, so it must not be able to point this at arbitrary\n // filesystem locations.\n const base::Value::Dict& added_paths =\n pref_service_->GetDict(prefs::kDevToolsFileSystemPaths);\n const bool under_registered_root =\n std::ranges::any_of(added_paths, [&path](const auto& entry) {\n const base::FilePath root = base::FilePath::FromUTF8Unsafe(entry.first);\n return root == path || root.IsParent(path);\n });\n if (!under_registered_root)\n return;\n\n // FIX: Bypasses platform_util::OpenPath entirely and directly reveals the file\n platform_util::ShowItemInFolder(path);\n}\n\n\nBy replacing the indirect open-then-reveal logic with a direct invocation of ShowItemInFolder, the application ensures that the operating system only highlights the file inside the file explorer rather than executing it. Furthermore, limiting path execution to pre-registered workspace roots prevents arbitrary path traversal attacks.

Exploitation Methodology

To exploit this vulnerability, an attacker must first establish a vector to run arbitrary JavaScript within the DevTools frontend context. This requirement constitutes a significant operational barrier, raising the attack complexity. Common vectors include exploiting cross-site scripting (XSS) in an application webview where DevTools is programmatically exposed, or tricking a user into installing a malicious DevTools extension.\n\nOnce JavaScript execution within the DevTools context is achieved, the attacker interacts directly with the DevToolsAPI global object. This object exposes the IPC messaging framework of the renderer process, allowing direct communication with the host system's main process.\n\nThe attacker crafts a payload path pointing to a local executable binary. The path must include a trailing dummy component to exploit the DirName() parsing behavior. The following proof-of-concept script demonstrates how to trigger the vulnerability on both Windows and Unix-like operating systems:\n\njavascript\n// Construct the path targeting system binaries with a dummy suffix\nconst windowsTarget = "C:\\\\Windows\\\\System32\\\\cmd.exe\\\\dummy_file";\nconst unixTarget = "/bin/ls/dummy_file";\n\nconst payload = (navigator.platform.indexOf('Win') !== -1) ? windowsTarget : unixTarget;\n\n// Trigger the vulnerable handler by passing the crafted path via IPC\nif (typeof DevToolsAPI !== "undefined") {\n DevToolsAPI.sendMessageToEmbedder('showItemInFolder', [payload], null);\n}\n\n\nWhen the main process receives the IPC message, it processes the payload, trims the dummy segment, and runs the targeted executable outside the sandbox environment with host privileges.

Impact Assessment

The impact of CVE-2026-70611 is classified as high-severity because it facilitates a complete sandbox escape. Although Chromium utilizes a robust multi-process architecture to isolate untrusted web content within restricted renderer processes, this flaw bypasses those protections. Successfully executing code via the DevTools embedder grants the attacker the execution privileges of the host desktop application.\n\nDepending on the privileges under which the parent Electron application is running, the spawned executable runs with identical rights. On systems where the application is run with administrative or elevated privileges, the attacker gains full administrative control over the host operating system. This allows for unauthorized file system read/write operations, credential extraction, and persistent malware installation.\n\nThe vulnerability is assigned a CVSS v3.1 score of 6.9, reflecting the high complexity of obtaining initial execution within the DevTools context. However, in scenarios where applications expose DevTools interfaces to untrusted external remote content, the vulnerability effectively acts as a reliable direct-to-host execution bridge.

Remediation and Mitigation

The primary remediation for CVE-2026-70611 is upgrading the Electron framework to a patched release. Development teams must update their project dependencies immediately to the safe versions corresponding to their active release branches. The patched versions are 39.8.9, 40.9.2, 41.2.1, and 42.0.0-beta.3.\n\nIf upgrading the framework is not immediately viable, developers can implement defensive configurations to mitigate risk. The most effective mitigation is ensuring that DevTools is strictly disabled in production builds. This can be accomplished by intercepting keyboard shortcuts and menu items that trigger the inspector interface:\n\njavascript\n// Mitigation: Disable DevTools shortcuts in production\nconst { app, BrowserWindow } = require('electron');\n\napp.on('browser-window-created', (event, window) => {\n window.webContents.on('before-input-event', (inputEvent, input) => {\n const isDevToolsShortcut = input.key === 'F12' || \n ((input.control || input.meta) && input.shift && input.key.toLowerCase() === 'i');\n if (isDevToolsShortcut) {\n inputEvent.preventDefault();\n }\n });\n});\n\n\nAdditionally, applications must enforce strict security settings. This includes enabling contextIsolation and sandbox options, while disabling nodeIntegration in all webPreferences configurations. Security teams should also monitor system process logs for anomalous process creations where command interpreters or shell binaries are spawned directly by the primary Electron application process.

Fix Analysis (4)

Technical Appendix

CVSS Score
6.9/ 10
CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:N

Affected Systems

Electron desktop applications running on WindowsElectron desktop applications running on macOSElectron desktop applications running on Linux

Affected Versions Detail

Product
Affected Versions
Fixed Version
Electron
Electron
< 39.8.939.8.9
Electron
Electron
>= 40.0.0-alpha.1, < 40.9.240.9.2
Electron
Electron
>= 41.0.0-alpha.1, < 41.2.141.2.1
Electron
Electron
>= 42.0.0-alpha.1, < 42.0.0-beta.342.0.0-beta.3
AttributeDetail
CWE IDCWE-78
Attack VectorLocal (AV:L)
CVSS Score6.9
EPSS ScoreNot Available
ImpactSandbox Escape & Arbitrary Code Execution
Exploit StatusProof-of-Concept (PoC) documented
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
T1190Exploit Public-Facing Application
Initial Access
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

The application constructs an OS command using externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements that can modify the intended command.

Known Exploits & Detection

GitHub AdvisoryOfficial advisory detailing the security flaw and containing references to vulnerability parameters.

Vulnerability Timeline

Vulnerability Fixed in Repositories
2026-04-11
Vulnerability Advisory Published
2026-08-05
NVD Record Modified
2026-08-05

References & Sources

  • [1]Electron Security Advisory GHSA-f2r8-jv7c-xqmp
  • [2]Fix Commit 10fb5b39c5287f70c4bbcab4c24197f3871ec322
  • [3]Fix Commit 1b8a298d629d5a642c816ea5f7505359de17b771
  • [4]Fix Commit 27bf1cae9274d5025684c7268496f435b7e06b44
  • [5]Fix Commit 7a1eb7e5585991b3726cedb890a6244f327f43de
  • [6]Pull Request 50937
  • [7]Pull Request 50938
  • [8]Pull Request 51114
  • [9]Pull Request 51115
  • [10]Electron Release v39.8.9
  • [11]Electron Release v40.9.2
  • [12]Electron Release v41.2.1
  • [13]Electron Release v42.0.0-beta.3

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
10 views•10 min read
•2 days ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
14 views•12 min read
•2 days ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read
•2 days ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
14 views•10 min read
•2 days ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
17 views•10 min read
•2 days ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
8 views•9 min read