launch-editor: escapeCmdArgs() omits % escaping on WindowsGHSA-698v-4r3x-3vcv
Fix: vitejs/launch-editor#155GHSA-698v-4r3x-3vcv is a OS Command Injection vulnerability in launch-editor. A fix is available for launch-editor — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-698v-4r3x-3vcv.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
launch-editornpmvitenpmDescription
Summary
launch-editor did not escape % on Windows when passing an argument to cmd. When an environment variable contained a malicious value, it was possible that that content to be executed.
Impact
Only apps that match all of the following conditions are affected:
- The user uses Windows
- An attacker can place a file with the malicious filename containing
&or% - Either of
- An attacker can inject an environment variable with a malicious value
- An attacker can add a NTFS alternate data stream to the file placed
Details
Unlike .sh files, .bat / .cmd files on Windows cannot be called directly using child_process.spawn and requires passing them as an argument of cmd.exe. To do so, launch-editor escapes the arguments passed to cmd.exe. But launch-editor did not escape % which is used for environment variables.
Because launch-editor checks if the argument matches an existing filename, the attack requires the attacker to be able to place a file.
- If the attacker can inject an environment variable as well, they can include the subcommand in the env variable (e.g. set
&calc.exeto%ENV%) and calllaunchEditorwithsomething%ENV%. - If the attacker can place a NTFS alternate data stream to the file (e.g. a NTFS alternate data stream named
~-38%calc.exe), they can calllaunchEditorwithsomething %CMDCMDLINE:~-38%calc.exe. - If the attacker can create a filename containing the
%CD%and the subcommand (e.g.&calc.exe), they can calllaunchEditorwith./%CD%
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | launch-editor | all versions | 2.14.2npm install launch-editor@2.14.2 |
| 📦npm | vite | ≥ 8.3.0&&< 8.3.3 | 8.3.3npm install vite@8.3.3 |
| 📦npm | vite | ≥ 8.2.0&&< 8.2.4 | 8.2.4npm install vite@8.2.4 |
| 📦npm | vite | ≥ 8.0.0&&< 8.1.6 | 8.1.6npm install vite@8.1.6 |
| 📦npm | vite | ≥ 7.0.0&&< 7.3.7 | 7.3.7npm install vite@7.3.7 |
| 📦npm | vite | all versions | 6.4.4npm install vite@6.4.4 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for launch-editor, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update launch-editor to 2.14.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-698v-4r3x-3vcv is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
--- CME Mitigation Guidance (2026-10-20) --- Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure. The highest-value action is to eliminate shell invocation when launching editors on Windows or enforce strict argument allowlists to avoid passing unescaped arguments directly to cmd.exe: upgrade to launch-editor 2.14.2 (or the fixed Grafana/Prometheus builds), which reject arguments containing percent signs,…Source: Red Hat security advisory for GHSA-698v-4r3x-3vcv (CC BY 4.0)
Frequently Asked Questions
Is GHSA-698v-4r3x-3vcv in your dependencies?
Find it across npm, including transitive dependencies.