CVE-2026-112948Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file
Updated under an hour ago ()
Does this affect you?
It affects vitest-dev vitest and 3 other products. Add what you run to find out whether that includes you.
No exploitation reported and no EPSS estimate yet.
Do this next
Free account, 1 product
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.
- CVSS
- 6.5 MEDIUM (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
- Weakness (CWE)
- CWE-200, CWE-552
- Known exploited
- Not in CISA's KEV catalog
- EPSS (exploitation in the next 30 days)
- Not loaded for this CVE
- Assigned by
- GitHub_M
- NVD analysis
- Awaiting Analysis
- Record last updated
- Oct 20, 2026
- First seen by InfoSec Signals
- Oct 20, 2026
Affected products
vitest-dev vitest vitest_dev:vitest (from the name) | from 5.0.0-beta.6, < 5.0.5 | CNA record |
@vitest browser vitest:browser (from the name) | from 5.0.0-beta.6, < 5.0.5 | CNA record |
@vitest ui vitest:ui (from the name) | from 5.0.0-beta.6, < 5.0.5 | CNA record |
vitejs vite-plus vitejs:vite_plus (from the name) | from 1.0.0-rc.0, < 1.3.0 | CNA record |
References
- https://github.com/vitest-dev/vitest/security/advisories/GHSA-p458-7748-mcp3x-refsource-confirm
- https://github.com/vitest-dev/vitest/pull/11578x-refsource-misc
- https://github.com/vitest-dev/vitest/commit/28dc1edfb6ba5a181fe208576989063795aeadb3x-refsource-misc
- https://github.com/vitest-dev/vitest/releases/tag/v5.0.5x-refsource-misc
The CVE record on cve.org NVD's entry
The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.