Vitest servers misapply server.fs.deny, exposing sensitive files
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Partial Red Hat: 7 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-200.
Summary
Vitest, @vitest/ui and @vitest/browser from 5.0.0-beta.6 before 5.0.5, and vite-plus from 1.0.0-rc.0 before 1.3.0, are affected. Dev servers misapply server.fs.deny rules, so denied files stay reachable (CWE-200). An attacker who can reach an affected server can read denied project files or the fallback API token, and a malicious website can read .env values in Browser Mode with test.projects.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
Vitest is a testing framework powered by Vite. From 5.0.0-beta.6 until 5.0.5, Vitest dev servers can misapply server.fs.deny because project servers replace Vite's defaults and the root server adds .vitest-secret-token after Vite compiles its matcher. An attacker who can reach an affected UI, Browser Mode, or API server can read denied project files or the fallback API token at node_modules/.vitest/.vitest-secret-token, and Browser Mode with test.projects can expose JavaScript-compatible .env values through a malicious website. This issue is fixed in version 5.0.5.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
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 | 5.0.0-beta.6 to before 5.0.5 | 5.0.5 | Patch available | CNA |
| @vitest | browser | 5.0.0-beta.6 to before 5.0.5 | 5.0.5 | Patch available | CNA |
| @vitest | ui | 5.0.0-beta.6 to before 5.0.5 | 5.0.5 | Patch available | CNA |
| vitejs | vite-plus | 1.0.0-rc.0 to before 1.3.0 | 1.3.0 | Patch available | CNA |
| — | @vitest/ui (npm) | 5.0.0-beta.6 to before 5.0.5 | 5.0.5 | Patch available | GHSA-p458-7748-mcp3 |
| — | @vitest/browser (npm) | 5.0.0-beta.6 to before 5.0.5 | 5.0.5 | Patch available | GHSA-p458-7748-mcp3 |
| — | vite-plus (npm) | 1.0.0-rc.0 to before 1.3.0 | 1.3.0 | Patch available | GHSA-p458-7748-mcp3 |
- vitest Vendorvitest-dev Affected 5.0.0-beta.6 to before 5.0.5 Fixed in 5.0.5 Patch available CNA
- browser Vendor@vitest Affected 5.0.0-beta.6 to before 5.0.5 Fixed in 5.0.5 Patch available CNA
- ui Vendor@vitest Affected 5.0.0-beta.6 to before 5.0.5 Fixed in 5.0.5 Patch available CNA
- vite-plus Vendorvitejs Affected 1.0.0-rc.0 to before 1.3.0 Fixed in 1.3.0 Patch available CNA
- @vitest/ui (npm) Vendor— Affected 5.0.0-beta.6 to before 5.0.5 Fixed in 5.0.5 Patch available GHSA-p458-7748-mcp3
- @vitest/browser (npm) Vendor— Affected 5.0.0-beta.6 to before 5.0.5 Fixed in 5.0.5 Patch available GHSA-p458-7748-mcp3
- vite-plus (npm) Vendor— Affected 1.0.0-rc.0 to before 1.3.0 Fixed in 1.3.0 Patch available GHSA-p458-7748-mcp3
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:*:*:* | — | — | vitest-dev |
- cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:*:*:* Versions — — ·vitest-dev
Remediation
Upgrade Vitest, @vitest/ui and @vitest/browser to 5.0.5, and vite-plus to 1.3.0. Red Hat rates this Moderate and has no plan available for 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 and Red Hat Trusted Artifact Signer.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA vitest (vitest-dev) Fixed in 5.0.5
- Fix · CNA browser (@vitest) Fixed in 5.0.5
- Fix · CNA ui (@vitest) Fixed in 5.0.5
- Fix · CNA vite-plus (vitejs) Fixed in 1.3.0
- Fix · GHSA-p458-7748-mcp3 @vitest/ui (npm) Fixed in 5.0.5 Advisory →
- Fix · GHSA-p458-7748-mcp3 @vitest/browser (npm) Fixed in 5.0.5 Advisory →
- Fix · GHSA-p458-7748-mcp3 vite-plus (npm) Fixed in 1.3.0 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat AMQ Broker 7 | Affected | No fix yet: Fix deferred |
| Red Hat Ansible Automation Platform 2 | Affected | No fix yet: Fix deferred |
| Red Hat Build of Keycloak | Affected | No fix yet: Fix deferred |
| Red Hat Build of Podman Desktop | Affected | No fix yet: Fix deferred |
| Red Hat JBoss Enterprise Application Platform 8 | Affected | No fix yet: Fix deferred |
| Red Hat JBoss Enterprise Application Platform Expansion Pack | Affected | No fix yet: Fix deferred |
| Red Hat Trusted Artifact Signer | Affected | No fix yet: Fix deferred |
Not affected: 1 product
- Red Hat Hardened Images
Timeline
- 2026-10-20 Threatist record created from CVE-2026-112948
- 2026-10-20 CISA SSVC decision points changed
- 2026-10-20 Priority changed: MEDIUM → LOW
- 2026-10-21 Affected versions changed · Red Hat
- 2026-10-21 CVSS score added · Red Hat
- 2026-10-21 Alias added: GHSA-p458-7748-mcp3
- 2026-10-21 Fix available: npm/@vitest/[email protected], npm/@vitest/[email protected], npm/[email protected] · GHSA-p458-7748-mcp3
- 2026-10-21 CVSS score added · GHSA-p458-7748-mcp3
- 2026-10-21 Weakness changed · GHSA-p458-7748-mcp3
- 2026-10-21 6 new references · GHSA-p458-7748-mcp3
References
Other 5
More vitest-dev vulnerabilities
- TI-2026-38677 Vitest: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE CVSS 3.1CRITICAL 9.8
- TI-2026-34992 Vitest: Arbitrary file can be read and executed when Vitest UI server is listening CVSS 3.1CRITICAL 9.8
- TI-2026-34991 Vitest browser mode serves unsanitized otelCarrier query parameter as inline script CVSS 3.1CRITICAL 9.6
- 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
- TI-2026-76917 Backslash traversal in Vitest mocker exposes files on Windows CVSS 3.1MEDIUM 5.9
Sources
- CVE-2026-112948 · CVE Program
- CVE-2026-112948 · NVD
- FIRST EPSS
- GHSA-p458-7748-mcp3 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-112948 · 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