Skip to main content
Vulnerability Database/CVE-2026-112943

CVE-2026-112943: launch-editor Node.js RCE Vulnerability

CVE-2026-112943 is a remote code execution flaw in launch-editor for Node.js that allows attackers to execute malicious code through environment variables on Windows. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-112943 Overview

CVE-2026-112943 affects launch-editor, a Node.js package that opens files with line numbers in a developer's editor. Versions prior to 2.14.2 did not escape the % character on Windows when constructing arguments passed to cmd.exe. When an environment variable contained a malicious value, that value could be executed as part of the command. The flaw is categorized as OS Command Injection [CWE-78] and resolved in version 2.14.2.

Critical Impact

Attackers who control environment variable content on a Windows host running launch-editor can inject commands that cmd.exe executes with the privileges of the invoking Node.js process.

Affected Products

  • launch-editor (npm package) on Windows platforms
  • Versions prior to 2.14.2
  • Applications bundling vulnerable launch-editor (including Vite-based tooling using the error overlay click-to-open feature)

Discovery Timeline

  • 2026-10-20 - CVE-2026-112943 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-112943

Vulnerability Analysis

launch-editor constructs a command line to spawn the user's editor and, on Windows, routes execution through cmd.exe. The library escaped shell metacharacters such as &, |, <, >, ,, ;, =, and ^, but omitted %. In cmd.exe, %VAR% performs environment variable expansion at command parse time. An attacker who can influence an environment variable value can embed command fragments that get expanded and executed after the escaping stage. The flaw lives in the Windows command construction path in packages/launch-editor/construct-windows-launch-command.js.

Root Cause

The escapeCmdArgs function used the regular expression /([&|<>,;=^])/g which did not include %. Because cmd.exe expands %VAR% substrings before executing the final command, any untrusted content containing % could trigger variable substitution. If an attacker-controlled environment variable held a payload like & calc.exe, that payload became part of the executed command line.

Attack Vector

Exploitation requires a Windows host, the vulnerable launch-editor version in the call path, and attacker influence over either an environment variable or a path argument containing % sequences. The typical trigger is a developer or server-side tool invoking launch-editor with a file path derived from untrusted input while a malicious environment variable is present in the process environment.

javascript
// Patch: packages/launch-editor/construct-windows-launch-command.js
// According to https://ss64.com/nt/syntax-esc.html,
// we can use `^` to escape `&`, `<`, `>`, `|`, `%`, and `^`
//
// `"` cannot appear in Windows paths, so it is outside the untrusted path input
// this sanitization protects.
function escapeCmdArgs(cmdArgs) {
  return cmdArgs.replace(/([&|<>,;=^])/g, '^$1')
}
// Source: https://github.com/vitejs/launch-editor/commit/3c2f9bf2ff8fe63d056a8f9cc52d825b66ca79fc

The companion change in packages/launch-editor/index.js wraps Windows launch command construction in a try/catch and now rejects paths containing % outright, surfacing an error through onErrorCallback instead of invoking a spawned process.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-112943

Indicators of Compromise

  • Unexpected cmd.exe child processes spawned by Node.js processes that load launch-editor
  • Editor-launch events where the file path argument contains % characters or %VAR%-style tokens
  • Process command lines showing editor invocations followed by extraneous commands (for example & whoami, & powershell -enc)

Detection Strategies

  • Inventory Node.js dependencies for launch-editor versions below 2.14.2 using npm ls launch-editor or software composition analysis tooling.
  • Alert on process-creation events where node.exe is the parent and cmd.exe spawns secondary binaries such as powershell.exe, rundll32.exe, or curl.exe.
  • Flag command lines originating from developer tooling that contain unescaped % characters passed to cmd.exe.

Monitoring Recommendations

  • Capture Windows process-creation telemetry (Event ID 4688 or Sysmon Event ID 1) for Node-based build servers and developer workstations.
  • Monitor environment variable modifications on CI/CD agents, particularly values set from pull-request metadata or external webhooks.
  • Correlate editor-launch activity with child-process chains that deviate from the expected editor binary (code.exe, subl.exe, etc.).

How to Mitigate CVE-2026-112943

Immediate Actions Required

  • Upgrade launch-editor to version 2.14.2 or later in all affected projects.
  • Audit transitive dependencies: launch-editor is pulled in by multiple frameworks and middleware; use npm ls launch-editor or pnpm why launch-editor to locate pinned versions.
  • On Windows CI runners and developer machines, review environment variables set from untrusted sources and remove any containing shell metacharacters.

Patch Information

The fix is released in launch-editor 2.14.2. See the GitHub Release v2.14.2, the merged Pull Request #155, the commit 3c2f9bf, and the GitHub Security Advisory GHSA-698v-4r3x-3vcv. The patch rejects any path containing % on Windows before command construction.

Workarounds

  • Disable editor-launch functionality (for example, Vite error overlay click-to-open) on Windows hosts until the upgrade is applied.
  • Restrict launch-editor usage to trusted local developer sessions and avoid exposing it in server contexts that process untrusted input.
  • Sanitize or strip % characters from any file path passed to launch-editor at the application layer.
bash
# Upgrade launch-editor across your project
npm install launch-editor@^2.14.2

# Verify no vulnerable versions remain in the dependency tree
npm ls launch-editor

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.