Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file
Summary
| CVE | CVE-2026-112948 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-10-20 16:17:05 UTC |
| Updated | 2026-10-20 19:56:45 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 6.5 MEDIUM from [email protected]
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Problem Types: CWE-200 | CWE-552 | CWE-200 CWE-200: Exposure of Sensitive Information to an Unauthorized Actor | CWE-552 CWE-552: Files or Directories Accessible to External Parties
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 6.5 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| 3.1 | CNA | DECLARED | 6.5 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
RequiredScope
UnchangedConfidentiality
HighIntegrity
NoneAvailability
NoneCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Vitest-dev | Vitest | affected >= 5.0.0-beta.6, < 5.0.5 | Not specified |
| CNA | @vitest | Browser | affected >= 5.0.0-beta.6, < 5.0.5 | Not specified |
| CNA | @vitest | Ui | affected >= 5.0.0-beta.6, < 5.0.5 | Not specified |
| CNA | Vitejs | Vite-plus | affected >= 1.0.0-rc.0, < 1.3.0 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/vitest-dev/vitest/commit/28dc1edfb6ba5a181fe208576989063795ae... | [email protected] | github.com | |
| github.com/vitest-dev/vitest/pull/11578 | [email protected] | github.com | |
| github.com/vitest-dev/vitest/releases/tag/v5.0.5 | [email protected] | github.com | |
| github.com/vitest-dev/vitest/security/advisories/GHSA-p458-7748-mcp3 | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.