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


- **Severity:** High 7.5 (`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`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 20 Oct 2026
- **Updated:** 21 Oct 2026
- **Also known as:** ECHO-e642-23bb-f67c, GHSA-587h-7wmj-h5pm, MINI-8h3p-79fw-2448, MINI-9422-82m8-c354, MINI-fc7r-4w4v-q36x, MINI-hpv5-j8g4-pj32, MINI-mm78-mhf9-c744, MINI-wg27-h76h-hj2r, ROOT-APP-NPM-CVE-2026-112942

## What is CVE-2026-112942?

CVE-2026-112942 is a high-severity vulnerability in vitejs launch-editor, published on 20 Oct 2026. 

### Official description

launch-editor allows users to open files with line numbers in editor from Node.js. Prior to 2.14.2, launch-editor-middleware processes an attacker-controlled Windows file argument where the file argument ends in a parent-directory component plus a line-and-column suffix: the path is resolved while the suffix is still present, and launch-editor removes the suffix before its existsSync check, leaving the existing parent directory for existsSync and allowing the attacker-controlled file argument to pass filename existence validation without requiring the malicious filename to exist. The bypass can lead to OS command injection when combined with the separately described Windows percent-expansion flaw. This issue is fixed in version 2.14.2.

Weakness: CWE-77 (Improper Neutralization of Special Elements used in a Command)

## Which versions are affected by CVE-2026-112942?

14 open source packages ship an affected version, including launch-editor, vite and vite-plus.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `launch-editor` | npm | All versions | 2.14.2 |
| `launch-editor` | npm | All versions | 2.14.2 |
| `vite` | npm | All versions | 6.4.4 |
| `vite` | npm | All versions | 6.4.4 |
| `vite` | npm | From 7.0.0 | 7.3.7 |
| `vite` | npm | From 7.0.0 | 7.3.7 |
| `vite` | npm | From 8.0.0 | 8.1.6 |
| `vite` | npm | From 8.0.0 | 8.1.6 |
| `vite` | npm | From 8.2.0 | 8.2.4 |
| `vite` | npm | From 8.2.0 | 8.2.4 |
| `vite` | npm | From 8.3.0 | 8.3.3 |
| `vite` | npm | From 8.3.0 | 8.3.3 |
| `vite-plus` | npm | All versions | 1.1.0 |
| `vite-plus` | npm | All versions | 1.1.0 |

## How do I fix CVE-2026-112942?

Upgrade launch-editor to 2.14.2 or later.

## Is CVE-2026-112942 being exploited?

There is no known exploitation of CVE-2026-112942 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-112942 and fix it if it is affected.

What it is: CVE-2026-112942 is a high-severity vulnerability in vitejs launch-editor, published on 20 Oct 2026. 
Exploitation: There is no known exploitation of CVE-2026-112942 in the wild and no public exploit code.

Affected packages and fixed versions:
- launch-editor (npm): affected all versions; fixed in 2.14.2
- launch-editor (npm): affected all versions; fixed in 2.14.2
- vite (npm): affected all versions; fixed in 6.4.4
- vite (npm): affected all versions; fixed in 6.4.4
- vite (npm): affected from 7.0.0; fixed in 7.3.7
- vite (npm): affected from 7.0.0; fixed in 7.3.7
- vite (npm): affected from 8.0.0; fixed in 8.1.6
- vite (npm): affected from 8.0.0; fixed in 8.1.6
- vite (npm): affected from 8.2.0; fixed in 8.2.4
- vite (npm): affected from 8.2.0; fixed in 8.2.4
- vite (npm): affected from 8.3.0; fixed in 8.3.3
- vite (npm): affected from 8.3.0; fixed in 8.3.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-112942/ (Markdown: https://insights.sbomify.com/CVE-2026-112942/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-112942
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-112942
- OSV: https://osv.dev/vulnerability/CVE-2026-112942

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-112942/
Summaries are generated and may contain mistakes; the official description above is the record.
