CVE-2026-112948
published medium CVSS 3.1 · 6.5Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| vitest-dev | — | vitest>= 5.0.0-beta.6, < 5.0.5 | Affected | Not stated | GitHub_M |
| @vitest | — | browser>= 5.0.0-beta.6, < 5.0.5 | Affected | Not stated | GitHub_M |
| @vitest | — | ui>= 5.0.0-beta.6, < 5.0.5 | Affected | Not stated | GitHub_M |
| vitejs | — | vite-plus>= 1.0.0-rc.0, < 1.3.0 | Affected | Not stated | GitHub_M |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.5 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| vitest-dev | vitest | >= 5.0.0-beta.6, < 5.0.5 (affected) | GitHub_M · cna |
| @vitest | browser | >= 5.0.0-beta.6, < 5.0.5 (affected) | GitHub_M · cna |
| @vitest | ui | >= 5.0.0-beta.6, < 5.0.5 (affected) | GitHub_M · cna |
| vitejs | vite-plus | >= 1.0.0-rc.0, < 1.3.0 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-200 CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
- CWE-552 CWE-552: Files or Directories Accessible to External Parties
References
4Provider assertions
2GitHub_M · cna
Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- a742dd4ea30c40006379c3a3df078fb3edfa4ff8ee49f549e3c789df992183ca
- Ingested
- 20 Oct 2026, 16:36:14 UTC
- Source record
- Official CVE record