Packages

ModerateVulnerabilityGHSA-698v-4r3x-3vcvPublished 20 Oct 2026

launch-editor: escapeCmdArgs() omits % escaping on Windows

Affected releases · vite

  • 8.x8.0.0 – 8.3.2Fixed in 8.3.3
  • 7.x7.0.0 – 7.3.6Fixed in 7.3.7
  • 6.x6.0.0 – 6.4.3Fixed in 6.4.4
  • 5.x and older0.1.0 – 5.4.21No fix, no longer updated

On 8.x, the newest line:

npm install vite@8.3.3
8.x
  1. Affected

    8.0.0 – 8.1.5

    23 releases

  2. Fixed

    8.1.6

    1 release

  3. Affected

    8.2.0 – 8.2.2

    3 releases

  4. Fixed

    8.2.4

    1 release

  5. Affected

    8.3.0 – 8.3.2

    3 releases

  6. Fixed

    8.3.3 – 8.3.4

    2 releases, latest

7.x
  1. Affected

    7.0.0 – 7.3.6

    35 releases

  2. Fixed

    7.3.7

    1 release

6.x
  1. Affected

    6.0.0 – 6.4.3

    43 releases

  2. Fixed

    6.4.4

    1 release

5.x
  1. Affected

    5.0.0 – 5.4.21

    67 releases

4.x
  1. Affected

    4.0.0 – 4.5.14

    53 releases

3.x
  1. Affected

    3.0.0 – 3.2.11

    30 releases

2.x
  1. Affected

    2.0.0 – 2.9.18

    97 releases

0.x
  1. Affected

    0.1.0 – 0.20.10

    78 releases

438 stable releases of vite, oldest to newest, one row per major.

Affected releases · vite-plus

  • 1.x1.0.0Fixed in 1.1.0
  • 0.3.x0.3.0 – 0.3.3No fix on this line yet
  • 0.2.x0.2.0 – 0.2.9No fix on this line yet
  • 0.1.x0.1.0 – 0.1.24No fix on this line yet
  • 0.0.x0.0.1No fix on this line yet

On 1.x, the newest line:

npm install vite-plus@1.1.0
1.x
  1. Affected

    1.0.0

    1 release

  2. Fixed

    1.1.0 – 1.3.0

    3 releases, latest

0.x
  1. Affected

    0.0.1 – 0.3.3

    40 releases

44 stable releases of vite-plus, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for vite. It is read in your browser and sent nowhere.

Is your project affected?

Paste your package.json, or type the range you declare for vite-plus. It is read in your browser and sent nowhere.

What happens

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.exe to %ENV%) and call launchEditor with something%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 call launchEditor with something %CMDCMDLINE:~-38%calc.exe.

  • If the attacker can create a filename containing the %CD% and the subcommand (e.g. &calc.exe ), they can call launchEditor with ./%CD%