CVE-2026-47429: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in vitest-dev vitest
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.
AI Analysis
Technical Summary
CVE-2026-47429 is a critical path traversal vulnerability (CWE-22) in the Vitest testing framework's UI/API server on Windows platforms. The vulnerability arises from incorrect use of the isFileServingAllowed function for the /__vitest_attachment__ path, permitting specially crafted paths (e.g., \\?\\..\\) to access files outside the intended project directory. Additionally, exposed API features such as saveTestFile and rerun can be abused to execute arbitrary scripts. This vulnerability affects Vitest versions prior to 3.2.5 and versions from 4.0.0 up to but not including 4.1.0. The issue is resolved in Vitest versions 3.2.5 and 4.1.0.
Potential Impact
Successful exploitation allows an unauthenticated attacker to read arbitrary files outside the project directory on Windows systems and potentially execute arbitrary scripts via the exposed API write and rerun features. This leads to full confidentiality, integrity, and availability compromise of the affected system as indicated by the CVSS score of 9.8 (critical).
Mitigation Recommendations
Upgrade Vitest to version 3.2.5 or later, or 4.1.0 or later, where this vulnerability is fixed. Patch status is confirmed by the vendor advisory indicating fixes in these versions. No other mitigations are specified or required once upgraded.
CVE-2026-47429: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in vitest-dev vitest
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.
CVSS v3.1
Score 9.8critical
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-47429 is a critical path traversal vulnerability (CWE-22) in the Vitest testing framework's UI/API server on Windows platforms. The vulnerability arises from incorrect use of the isFileServingAllowed function for the /__vitest_attachment__ path, permitting specially crafted paths (e.g., \\?\\..\\) to access files outside the intended project directory. Additionally, exposed API features such as saveTestFile and rerun can be abused to execute arbitrary scripts. This vulnerability affects Vitest versions prior to 3.2.5 and versions from 4.0.0 up to but not including 4.1.0. The issue is resolved in Vitest versions 3.2.5 and 4.1.0.
Potential Impact
Successful exploitation allows an unauthenticated attacker to read arbitrary files outside the project directory on Windows systems and potentially execute arbitrary scripts via the exposed API write and rerun features. This leads to full confidentiality, integrity, and availability compromise of the affected system as indicated by the CVSS score of 9.8 (critical).
Mitigation Recommendations
Upgrade Vitest to version 3.2.5 or later, or 4.1.0 or later, where this vulnerability is fixed. Patch status is confirmed by the vendor advisory indicating fixes in these versions. No other mitigations are specified or required once upgraded.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-19T19:37:43.527Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a568f2568715ace43148c45
Added to database: 07/14/2026, 19:33:57 UTC
Last enriched: 07/21/2026, 20:15:31 UTC
Last updated: 08/23/2026, 22:52:11 UTC
Views: 78
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.