Skip to content
Heist/ feed
Back to feed
HighFix available

launch-editor: `fs.existsSync()` existence check can be bypassed on Windows

Type: advisorySources: OSV

### 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.

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-112942
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 13:20 UTC · Revision 1

Source evidence

launch-editor: `fs.existsSync()` existence check can be bypassed on Windows

core-osv · Original source

Published 20 Oct 2026, 19:48 UTC

### 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.

osv:GHSA-587h-7wmj-h5pm

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": "ed0d934adf047436a0ccfb86ff8fa361462f86a1674a15fae480c271b49d7ade",
  "url": "https://osv.dev/vulnerability/GHSA-587h-7wmj-h5pm",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "launch-editor: `fs.existsSync()` existence check can be bypassed on Windows",
    "summary": "### 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.",
    "evidence": "osv:GHSA-587h-7wmj-h5pm",
    "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": "high",
    "structured": {
      "id": "GHSA-587h-7wmj-h5pm",
      "aliases": [
        "CVE-2026-112942",
        "GHSA-587h-7wmj-h5pm"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/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-587h-7wmj-h5pm/GHSA-587h-7wmj-h5pm.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-587h-7wmj-h5pm/GHSA-587h-7wmj-h5pm.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-587h-7wmj-h5pm/GHSA-587h-7wmj-h5pm.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-587h-7wmj-h5pm/GHSA-587h-7wmj-h5pm.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-587h-7wmj-h5pm/GHSA-587h-7wmj-h5pm.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-587h-7wmj-h5pm/GHSA-587h-7wmj-h5pm.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-587h-7wmj-h5pm/GHSA-587h-7wmj-h5pm.json",
            "last_known_affected_version_range": "<= 1.0.0"
          }
        }
      ],
      "modified": "2026-10-20T20:00:04.608979840Z",
      "provider": "osv",
      "references": [
        "https://github.com/vitejs/launch-editor/security/advisories/GHSA-587h-7wmj-h5pm",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-112942",
        "https://github.com/vitejs/launch-editor/commit/f13cd835d4b8e860b1d4d080ad8a490cc2463679",
        "https://github.com/vitejs/launch-editor",
        "https://github.com/vitejs/launch-editor/releases/tag/v2.14.2"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-77"
        ],
        "severity": "HIGH",
        "github_reviewed": true,
        "nvd_published_at": "2026-10-20T15:17:17Z",
        "github_reviewed_at": "2026-10-20T19:48:25Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-112942",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 390362,
  "published_at": "2026-10-20T19:48:25+00:00"
}