Vulnerability · Published Jul 14, 2026 · Assigned by GitHub_M
CVE-2026-47429Vitest: Arbitrary file can be read and executed when Vitest UI server is listening
Critical 9.8
In plain English
A critical-severity path traversal in vitest from vitest-dev. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 64% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | vitest | 4.1.0 | GHSA-5xrq-8626-4rwp |
| npm | vitest | 3.2.6 | GHSA-5xrq-8626-4rwp |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| vitest-dev | vitest | < 3.2.5>= 4.0.0, < 4.1.0 |
Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/vitest-dev/vitest/security/advisories/GHSA-5xrq-8626-4rwp x_refsource_CONFIRM
- https://github.com/vitest-dev/vitest/pull/10445 x_refsource_MISC
- https://github.com/vitest-dev/vitest/pull/9350 x_refsource_MISC
- https://github.com/vitest-dev/vitest/commit/20e00ef7808de6d330c5e2fda530f686e08f1c8d x_refsource_MISC
- https://github.com/vitest-dev/vitest/commit/af88b1f5d82844a4761ea9a977156c98e2b14ca8 x_refsource_MISC
- https://github.com/vitest-dev/vitest/releases/tag/v3.2.5 x_refsource_MISC
- https://github.com/vitest-dev/vitest/releases/tag/v4.1.0 x_refsource_MISC