CVE-2026-47429: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in vitest-dev vitest
CVE-2026-47429 is a critical path traversal vulnerability in the Vitest testing framework's UI/API server on Windows. Versions prior to 3.2.5 and 4.1.0 improperly handle pathname restrictions, allowing attackers to read files outside the project directory via a specially crafted path. Additionally, exposed API features like saveTestFile and rerun could enable arbitrary script execution. The issue is fixed in Vitest versions 3.2.5 and 4.1.0.
AI Analysis
Technical Summary
Vitest versions before 3.2.5 and 4.1.0 on Windows incorrectly use the isFileServingAllowed function for the /__vitest_attachment__ path, enabling a path traversal attack using \\?\\..\\ sequences. This vulnerability allows unauthorized reading of files outside the intended project directory. Furthermore, exposed API write and rerun features such as saveTestFile and rerun can be exploited to execute arbitrary scripts. The vulnerability is addressed by updates in versions 3.2.5 and 4.1.0.
Potential Impact
Successful exploitation can lead to full confidentiality, integrity, and availability compromise of the affected system. Attackers can read arbitrary files outside the project scope and execute arbitrary scripts, potentially leading to system takeover or data leakage.
Mitigation Recommendations
A fix is available in Vitest versions 3.2.5 and 4.1.0. Users should upgrade to these or later versions to remediate the vulnerability. Patch status is not explicitly confirmed in the advisory, but the description states the issue is fixed in these versions. No alternative mitigations are provided.
CVE-2026-47429: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in vitest-dev vitest
Description
CVE-2026-47429 is a critical path traversal vulnerability in the Vitest testing framework's UI/API server on Windows. Versions prior to 3.2.5 and 4.1.0 improperly handle pathname restrictions, allowing attackers to read files outside the project directory via a specially crafted path. Additionally, exposed API features like saveTestFile and rerun could enable arbitrary script execution. The issue is fixed in Vitest 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
Vitest versions before 3.2.5 and 4.1.0 on Windows incorrectly use the isFileServingAllowed function for the /__vitest_attachment__ path, enabling a path traversal attack using \\?\\..\\ sequences. This vulnerability allows unauthorized reading of files outside the intended project directory. Furthermore, exposed API write and rerun features such as saveTestFile and rerun can be exploited to execute arbitrary scripts. The vulnerability is addressed by updates in versions 3.2.5 and 4.1.0.
Potential Impact
Successful exploitation can lead to full confidentiality, integrity, and availability compromise of the affected system. Attackers can read arbitrary files outside the project scope and execute arbitrary scripts, potentially leading to system takeover or data leakage.
Mitigation Recommendations
A fix is available in Vitest versions 3.2.5 and 4.1.0. Users should upgrade to these or later versions to remediate the vulnerability. Patch status is not explicitly confirmed in the advisory, but the description states the issue is fixed in these versions. No alternative mitigations are provided.
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/14/2026, 20:03:23 UTC
Last updated: 07/14/2026, 23:47:39 UTC
Views: 8
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.