Vitest: Arbitrary file can be read and executed when Vitest UI server is listening
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-862.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| vitest-dev | vitest | before 3.2.5; 4.0.0 to before 4.1.0 | 3.2.5, 4.1.0 | Patch available | CNA |
| — | vitest (npm) | 4.0.0 to before 4.1.0 | 4.1.0 | Patch available | GHSA-5xrq-8626-4rwp |
| — | vitest (npm) | before 3.2.6 | 3.2.6 | Patch available | GHSA-5xrq-8626-4rwp |
- vitest Vendorvitest-dev Affected before 3.2.5; 4.0.0 to before 4.1.0 Fixed in 3.2.5, 4.1.0 Patch available CNA
- vitest (npm) Vendor— Affected 4.0.0 to before 4.1.0 Fixed in 4.1.0 Patch available GHSA-5xrq-8626-4rwp
- vitest (npm) Vendor— Affected before 3.2.6 Fixed in 3.2.6 Patch available GHSA-5xrq-8626-4rwp
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* | before 3.2.5; 4.0.0 to before 4.1.0 | Vulnerable | vitest-dev |
- cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* Versions before 3.2.5; 4.0.0 to before 4.1.0 Vulnerable ·vitest-dev
Remediation
- Fix · CNA vitest (vitest-dev) Fixed in 3.2.5, 4.1.0
- Fix · GHSA-5xrq-8626-4rwp vitest (npm) Fixed in 4.1.0 Advisory →
- Fix · GHSA-5xrq-8626-4rwp vitest (npm) Fixed in 3.2.6 Advisory →
Red Hat 1 advisory
- RHSA-2026:39058 Released 2026-07-13 · Red Hat rating CriticalRed Hat Hardened Images RPMs bug fix and enhancement update
- Red Hat Hardened Images prometheus3.13-3.13.1-0.1.hum1@aarch64, prometheus3.13-3.13.1-0.1.hum1@src, prometheus3.13-3.13.1-0.1.hum1@x86_64
Vendor assessments
Red Hat
Red Hat rating: Critical. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Hardened Images | Fixed | RHSA-2026:39058 |
Not affected: 8 products
- Red Hat AMQ Broker 7
- Red Hat Ansible Automation Platform 2
- Red Hat Build of Keycloak
- Red Hat Build of Podman Desktop
- Red Hat JBoss Enterprise Application Platform 8
- Red Hat JBoss Enterprise Application Platform Expansion Pack
- Red Hat OpenShift Container Platform 4
- Red Hat OpenShift Container Platform 5
Timeline
- 2026-10-02 Threatist record created from CVE-2026-47429
- 2026-10-03 Alias added: GHSA-5xrq-8626-4rwp
- 2026-11-05 Affected versions changed · Red Hat
References
Exploit 3
Patch 2
Other 9
- https://github.com/vitest-dev/vitest/releases/tag/v3.2.5
- https://github.com/vitest-dev/vitest/releases/tag/v4.1.0
- https://github.com/vitest-dev/vitest
- https://github.com/vitest-dev/vitest/blob/eb1abf08573032a532015b999ad3501c5e89e3bb/packages/browser/src/node/commands/fs.ts#L10-L11
- https://github.com/vitest-dev/vitest/blob/eb1abf08573032a532015b999ad3501c5e89e3bb/packages/browser/src/node/plugin.ts#L194-L196
- https://github.com/vitest-dev/vitest/blob/eb1abf08573032a532015b999ad3501c5e89e3bb/packages/browser/src/node/rpc.ts#L115-L121
- https://github.com/vitest-dev/vitest/blob/eb1abf08573032a532015b999ad3501c5e89e3bb/packages/ui/node/index.ts#L77
- https://github.com/vitest-dev/vitest/blob/eb1abf08573032a532015b999ad3501c5e89e3bb/packages/vitest/src/api/setup.ts#L103-L105
- https://github.com/vitest-dev/vitest/blob/eb1abf08573032a532015b999ad3501c5e89e3bb/packages/vitest/src/api/setup.ts#L119-L121
More vitest-dev Vitest vulnerabilities
- TI-2025-18644 Remote Code Execution when accessing a malicious website while Vitest API server is listening CVSS 3.1CRITICAL 9.7
- TI-2025-18643 Browser mode serves arbitrary files in vitest CVSS 3.1HIGH 7.5
Sources
- CVE-2026-47429 · CVE Program
- CVE-2026-47429 · NVD
- FIRST EPSS
- GHSA-5xrq-8626-4rwp · GitHub Advisory Database · CC BY 4.0
- CVE-2026-47429 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences