CVE-2026-112942: CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') in vitejs launch-editor
Description
### Summary `launch-editor` checked `fs.existsSync(fileName)` before passing a supplied path to an editor command. On Windows, an attacker can bypass this check with a crafted path ending in `\\..:line:column`. This removes the requirement that the attacker be able to place a file with a malicious filename. Combined with the `%` escaping issue described in [GHSA-698v-4r3x-3vcv](https://github.com/vitejs/launch-editor/security/advisories/GHSA-698v-4r3x-3vcv), this bypass can lead to OS command injection when an attacker controls the file argument. ### Impact Only apps that runs on Windows is affected. ### Details The earlier advisory assumed that `fs.existsSync()` required an attacker-controlled filename to exist. This advisory covers a bypass of that requirement. A crafted value ending in `\\..:1:1` is interpreted differently by `launch-editor-middleware`, `launch-editor`, and Windows: 1. `launch-editor-middleware` calls `path.resolve()` while the final path component is `..:1:1`, so it is not treated as a parent-directory component. 2. `launch-editor` treats `:1:1` as a line-and-column suffix and removes it, leaving a path ending in `\\..`. 3. On Windows, `fs.existsSync()` accepts the resulting path as the existing parent directory even though the attacker-controlled preceding component does not exist. 4. Because the existence check passes, the crafted filename reaches the Windows shell command.
CVSS v4.0
Score 7.5high
Affected software
vitejs
launch-editor
vitejs
vite
vitejs
vite-plus
pkg:npm/launch-editorRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The launch-editor component of vitejs allows users to open files with line numbers in an editor from Node.js. Versions prior to 2.14.2 of launch-editor-middleware improperly process Windows file arguments that end with a parent-directory component plus a line-and-column suffix. The path resolution occurs while the suffix is still present, but the suffix is removed before the existsSync check. This leads to a bypass of filename existence validation because the existing parent directory is checked instead of the full malicious path. When combined with a separate Windows percent-expansion flaw, this can lead to OS command injection. The vulnerability is addressed in vitejs launch-editor version 2.14.2.
Potential Impact
An attacker can exploit this vulnerability to bypass filename existence checks and potentially execute arbitrary OS commands on affected systems. This can lead to unauthorized command execution with the privileges of the Node.js process running launch-editor. The CVSS 4.0 score is 7.5 (high severity), indicating significant impact if exploited.
Mitigation Recommendations
Upgrade vitejs launch-editor to version 2.14.2 or later, where this vulnerability is fixed. No other mitigation or temporary workaround is indicated in the provided data.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-19T21:30:47.245Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ad782e92cdf04f65638a994
Added to database: 10/20/2026, 15:04:09 UTC
Last enriched: 10/20/2026, 15:18:32 UTC
Last updated: 10/20/2026, 22:33:45 UTC
Views: 9
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.