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 products
vitest.dev: vitest
References8
- github.com/vitest-dev/vitest/security/advisories/GHSA-5xrq-8626… ExploitMitigationVendor Advisory
- github.com/vitest-dev/vitest/security/advisories/GHSA-5xrq-8626… ExploitMitigationVendor Advisory
- github.com/vitest-dev/vitest/commit/20e00ef7808de6d330c5e2fda53… Patch
- github.com/vitest-dev/vitest/commit/af88b1f5d82844a4761ea9a9771… Patch
- github.com/vitest-dev/vitest/pull/10445 ExploitIssue TrackingPatch
- github.com/vitest-dev/vitest/pull/9350 ExploitIssue TrackingPatch
- github.com/vitest-dev/vitest/releases/tag/v3.2.5 Release Notes
- github.com/vitest-dev/vitest/releases/tag/v4.1.0 Release Notes
Metrics
- CVSS 3.1
-
5.9
MEDIUM
Score source: NVD
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N - EPSS — exploit probability
- 1% percentile: 64 · as of 15 November 2026
- CWE
- CWE-22
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.