launch-editor: Editor CLI flag misinterpretation causing arbitrary command execution for some editors
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 2.14.2, 8.3.3, 8.2.4, 8.1.6, 7.3.7, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: partial
Summary
launch-editor allows users to open files with line numbers in editor from Node.js. Prior to 2.14.2, when an attacker can create a filesystem entry beginning with plus or minus in the working directory, an affected editor is selected, and the path can remain relative or is converted to a relative WSL path, launchEditor forwards the path without forcing it to be interpreted as a positional filename. Editor option parsing then treats the attacker-controlled filename as a command-line flag, which can cause unintended file overwrite or arbitrary command execution by the selected editor. The affected editors are Vim and gVim, MacVim, Emacs and Emacsclient, and Notepad++ when a plugin exposes dangerous operations; WSL path conversion keeps Vite and newer middleware callers exposed. This issue is fixed in version 2.14.2.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
- First seen by cve.now
Affected versions
- vitejs launch-editor
fixed in 2.14.2
- vitejs vite
From 8.3.0 · fixed in 8.3.3; From 8.2.0 · fixed in 8.2.4; From 8.0.0 · fixed in 8.1.6; From 7.0.0 · fixed in 7.3.7; fixed in 6.4.4
- vitejs vite-plus
fixed in 1.1.0
- launch-editornpm
fixed in 2.14.2
- vitenpm
From 8.3.0 · fixed in 8.3.3
- vitenpm
From 8.2.0 · fixed in 8.2.4
- vitenpm
From 8.0.0 · fixed in 8.1.6
- vitenpm
From 7.0.0 · fixed in 7.3.7
- vitenpm
fixed in 6.4.4
- vite-plusnpm
fixed in 1.1.0