Skip to content
Heist/ feed
Back to feed
MediumFix available

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

Type: advisorySources: OSV

### 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`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processspawncommand-args-options) 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`. - I

Products
launch-editor, vite, vite-plus
Affected versions
Not specified
Fixed versions
1.1.0, 2.14.2, 6.4.4, 7.3.7, 8.1.6, 8.2.4, 8.3.3
CVEs
CVE-2026-112943
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 13:14 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 20 Oct 2026, 18:30 UTC

### 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`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processspawncommand-args-options) 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`. - I

osv:GHSA-698v-4r3x-3vcv

launch-editor

Fixed versions: 2.14.2

vite

Fixed versions: 8.3.3

vite

Fixed versions: 8.2.4

vite

Fixed versions: 8.1.6

vite

Fixed versions: 7.3.7

vite

Fixed versions: 6.4.4

vite-plus

Fixed versions: 1.1.0

Complete source record
{
  "id": "18692052d097566bf5e13361b8dddc8ee761a0d5a400291561eb83acdcc1f208",
  "url": "https://osv.dev/vulnerability/GHSA-698v-4r3x-3vcv",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "launch-editor: escapeCmdArgs() omits % escaping on Windows",
    "summary": "### 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`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processspawncommand-args-options) 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`. - I",
    "evidence": "osv:GHSA-698v-4r3x-3vcv",
    "products": [
      {
        "name": {
          "value": "launch-editor",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.14.2",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "vite",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "8.3.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "vite",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "8.2.4",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "vite",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "8.1.6",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "vite",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "7.3.7",
            "evidence": "/affected/4/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "vite",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.4.4",
            "evidence": "/affected/5/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "vite-plus",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.1.0",
            "evidence": "/affected/6/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "GHSA-698v-4r3x-3vcv",
      "aliases": [
        "CVE-2026-112943",
        "GHSA-698v-4r3x-3vcv"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.14.2"
                }
              ]
            }
          ],
          "package": {
            "name": "launch-editor",
            "purl": "pkg:npm/launch-editor",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-698v-4r3x-3vcv/GHSA-698v-4r3x-3vcv.json",
            "last_known_affected_version_range": "<= 2.14.1"
          }
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "8.3.0"
                },
                {
                  "fixed": "8.3.3"
                }
              ]
            }
          ],
          "package": {
            "name": "vite",
            "purl": "pkg:npm/vite",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-698v-4r3x-3vcv/GHSA-698v-4r3x-3vcv.json",
            "last_known_affected_version_range": "<= 8.3.2"
          }
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "8.2.0"
                },
                {
                  "fixed": "8.2.4"
                }
              ]
            }
          ],
          "package": {
            "name": "vite",
            "purl": "pkg:npm/vite",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-698v-4r3x-3vcv/GHSA-698v-4r3x-3vcv.json",
            "last_known_affected_version_range": "<= 8.2.3"
          }
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "8.0.0"
                },
                {
                  "fixed": "8.1.6"
                }
              ]
            }
          ],
          "package": {
            "name": "vite",
            "purl": "pkg:npm/vite",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-698v-4r3x-3vcv/GHSA-698v-4r3x-3vcv.json",
            "last_known_affected_version_range": "<= 8.1.5"
          }
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "7.0.0"
                },
                {
                  "fixed": "7.3.7"
                }
              ]
            }
          ],
          "package": {
            "name": "vite",
            "purl": "pkg:npm/vite",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-698v-4r3x-3vcv/GHSA-698v-4r3x-3vcv.json",
            "last_known_affected_version_range": "<= 7.3.6"
          }
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6.4.4"
                }
              ]
            }
          ],
          "package": {
            "name": "vite",
            "purl": "pkg:npm/vite",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-698v-4r3x-3vcv/GHSA-698v-4r3x-3vcv.json",
            "last_known_affected_version_range": "<= 6.4.3"
          }
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.1.0"
                }
              ]
            }
          ],
          "package": {
            "name": "vite-plus",
            "purl": "pkg:npm/vite-plus",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-698v-4r3x-3vcv/GHSA-698v-4r3x-3vcv.json",
            "last_known_affected_version_range": "<= 1.0.0"
          }
        }
      ],
      "modified": "2026-10-20T18:45:09.467993691Z",
      "provider": "osv",
      "references": [
        "https://github.com/vitejs/launch-editor/security/advisories/GHSA-698v-4r3x-3vcv",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-112943",
        "https://github.com/vitejs/launch-editor/pull/155",
        "https://github.com/vitejs/launch-editor/commit/3c2f9bf2ff8fe63d056a8f9cc52d825b66ca79fc",
        "https://github.com/vitejs/launch-editor",
        "https://github.com/vitejs/launch-editor/releases/tag/v2.14.2"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-78"
        ],
        "severity": "MODERATE",
        "github_reviewed": true,
        "nvd_published_at": "2026-10-20T15:17:17Z",
        "github_reviewed_at": "2026-10-20T18:30:24Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-112943",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 390157,
  "published_at": "2026-10-20T18:30:24+00:00"
}