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-112942 Overview
CVE-2026-112942 affects launch-editor, a Node.js package that opens files with line numbers in a developer's editor. The flaw resides in launch-editor-middleware and allows an attacker to bypass filename existence validation on Windows. The package resolves the file path while a line-and-column suffix is still present, then strips the suffix before the existsSync check. This behavior leaves the parent directory in place for validation, letting an attacker-controlled file argument pass without the malicious filename actually existing. When combined with a separately documented Windows percent-expansion flaw, the bypass enables operating system command injection. The issue is fixed in version 2.14.2.
Critical Impact
Attackers can bypass filename existence checks in launch-editor-middleware on Windows and chain the flaw with percent-expansion behavior to achieve OS command injection against developer tooling.
Affected Products
- launch-editor versions prior to 2.14.2
- launch-editor-middleware (bundled with launch-editor) prior to 2.14.2
- Node.js development servers on Windows that expose launch-editor-middleware, including Vite-based tooling
Discovery Timeline
- 2026-10-20 - CVE-2026-112942 published to NVD
- 2026-10-21 - Last updated in NVD database
Technical Details for CVE-2026-112942
Vulnerability Analysis
The vulnerability is a command injection enabler classified under [CWE-77]. The launch-editor package accepts a file argument of the form path/to/file:LINE:COLUMN. The pre-patch code resolved the path before stripping the position suffix, which caused fs.existsSync to validate the parent directory rather than the intended file. An attacker can craft an argument ending in a parent-directory component (..) plus the line-and-column suffix. The parent directory exists, so validation succeeds even when the referenced filename does not. The attacker-controlled string is then passed downstream to the editor launch command. When paired with Windows percent-expansion handling in command construction, the untrusted filename is interpreted as shell metadata and executed as part of the OS command.
Root Cause
The root cause is an ordering flaw in path handling. The original code performed path.resolve on the raw input, then removed the position suffix before calling existsSync. This mismatch between the validated path and the forwarded argument allowed non-existent filenames to pass validation. The fix introduces a dedicated parse-file.js module that strips the position suffix first and then resolves the clean file path for validation.
Attack Vector
Exploitation requires an attacker to supply a crafted file argument to a Node.js development server running launch-editor-middleware on Windows. The attack vector is network-reachable with user interaction, typically through a malicious link or page that triggers the editor-launch endpoint. Successful chaining with the Windows percent-expansion flaw results in arbitrary command execution in the developer's session.
// Patch from launch-editor v2.14.2 - packages/launch-editor/parse-file.js
const path = require('path')
const positionRE = /:(\d+)(:(\d+))?$/
module.exports = function parseFile(file) {
// support `file://` protocol
if (file.startsWith('file://')) {
file = require('url').fileURLToPath(file)
}
const unresolvedFileName = file.replace(positionRE, '')
const fileName = unresolvedFileName ? path.resolve(unresolvedFileName) : ''
const match = file.match(positionRE)
const lineNumber = match && match[1]
const columnNumber = match && match[3]
return {
fileName,
lineNumber,
columnNumber,
}
}
// Source: https://github.com/vitejs/launch-editor/commit/f13cd835d4b8e860b1d4d080ad8a490cc2463679
The patch strips the :LINE:COLUMN suffix before resolving the path, ensuring existsSync checks the actual target rather than a parent directory.
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 AttemptsDetection Methods for CVE-2026-112942
Indicators of Compromise
- HTTP requests to launch-editor-middleware endpoints containing file arguments that end in ..:<digits>:<digits> or similar parent-directory plus line-and-column patterns.
- Child process creation events on Windows where a developer tool spawns cmd.exe or editor binaries with shell metacharacters or percent-expansion tokens in arguments.
- Unexpected editor launches or process executions originating from a Vite or similar development server during browsing of untrusted content.
Detection Strategies
- Inspect reverse proxy and development server logs for query parameters containing position suffixes appended to traversal sequences.
- Monitor for Node.js processes on developer workstations spawning unexpected child processes with crafted command-line arguments.
- Use software composition analysis to flag any direct or transitive dependency on launch-editor below version 2.14.2.
Monitoring Recommendations
- Enable endpoint telemetry on developer workstations to capture process ancestry for Node.js and editor launches.
- Alert on outbound requests from browsers to localhost endpoints associated with launch-editor-middleware when triggered by third-party origins.
- Audit CI and build environments for exposed development servers that bind launch-editor-middleware to non-loopback interfaces.
How to Mitigate CVE-2026-112942
Immediate Actions Required
- Upgrade launch-editor and launch-editor-middleware to version 2.14.2 or later across all projects and lockfiles.
- Rebuild and redeploy any developer tooling, CLIs, or framework servers that bundle launch-editor as a transitive dependency.
- Restrict development servers to loopback interfaces and avoid exposing editor-launch endpoints to untrusted networks.
Patch Information
The fix is published in GitHub Release v2.14.2 and detailed in the GitHub Security Advisory GHSA-587h-7wmj-h5pm. The code change is available in the upstream commit, which introduces parse-file.js to perform suffix stripping before path resolution.
Workarounds
- Disable or remove launch-editor-middleware from Vite and similar development servers when a patch cannot be applied immediately.
- Block external access to development server ports using host firewall rules and bind servers to 127.0.0.1 only.
- Avoid browsing untrusted websites while a vulnerable development server is running on Windows.
# Upgrade launch-editor to the fixed release
npm install launch-editor@^2.14.2 launch-editor-middleware@^2.14.2
# Verify installed versions across the dependency tree
npm ls launch-editor launch-editor-middleware
# Force resolution for transitive dependencies (npm >= 8.3)
npm pkg set overrides.launch-editor="^2.14.2"
npm install
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

