# CVE-2026-47429: Vitest: Arbitrary file can be read and executed when Vitest UI server is listening

> Attackers can read arbitrary files and execute scripts via path traversal in the Vitest UI server on Windows when the server is active.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Jul 2026
- **Updated:** 21 Jul 2026
- **Also known as:** GHSA-5xrq-8626-4rwp, MINI-46v9-5hx4-wh5v, MINI-543j-26p3-xqcx, MINI-69gr-x579-2vc3, MINI-g954-c4jp-4wxv, MINI-jr9p-322p-258c, MINI-pgv5-27hp-8cp9, MINI-pwr6-64vh-vjxp, MINI-v3cr-8r9f-7pm3, ROOT-APP-NPM-CVE-2026-47429

## What is CVE-2026-47429?

CVE-2026-47429 is a critical path traversal vulnerability in vitest-dev vitest, published on 14 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Vitest is a testing framework powered by Vite. Prior to 3.2.5 and 4.1.0, the Vitest UI/API server on Windows used isFileServingAllowed incorrectly for /__vitest_attachment__, allowing \\?\\..\\ path traversal to read files outside the project; exposed API write and rerun features such as saveTestFile and rerun could also allow arbitrary script execution. This issue is fixed in versions 3.2.5 and 4.1.0.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

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

4 open source packages ship an affected version, including vitest. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `vitest` | npm | All versions | 3.2.6 |
| `vitest` | npm | All versions | 3.2.6 |
| `vitest` | npm | From 4.0.0 | 4.1.0 |
| `vitest` | npm | From 4.0.0 | 4.1.0 |

Products: Vitest.dev Vitest.

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

Upgrade vitest to a fixed version for your release line: 3.2.6 or 4.1.0.

## Is CVE-2026-47429 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-47429 exists.

Public exploit code:

- Running OWASP cve-lite-cli against the pi monorepo: scan journey and key finding (vitest CVE-2026-47429). (github_poc): https://github.com/az9713/cve-lite-on-pi

## Other vulnerabilities in vitest-dev vitest

- [CVE-2025-24964](https://insights.sbomify.com/CVE-2025-24964/): Remote Code Execution when accessing a malicious website while Vitest API server is listening (critical 9.7)
- [CVE-2025-24963](https://insights.sbomify.com/CVE-2025-24963/): Browser mode serves arbitrary files in vitest (medium 5.9)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-47429 is a critical path traversal vulnerability in vitest-dev vitest, published on 14 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-47429 exists.

Affected packages and fixed versions:
- vitest (npm): affected all versions; fixed in 3.2.6
- vitest (npm): affected all versions; fixed in 3.2.6
- vitest (npm): affected from 4.0.0; fixed in 4.1.0
- vitest (npm): affected from 4.0.0; fixed in 4.1.0

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-47429/ (Markdown: https://insights.sbomify.com/CVE-2026-47429/index.md)
```

## Sources

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

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