# CVE-2026-112948: Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.40%, higher than 36% of CVEs (2026-12-01)
- Published: 2026-10-20T15:15:01.927Z
- Modified: 2026-10-21T20:01:39.862Z
- Also known as: GHSA-p458-7748-mcp3
- Weaknesses: CWE-200, CWE-552
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: 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.

(As written by CVE List.)

## Affected

- vitest-dev vitest: >= 5.0.0-beta.6, < 5.0.5
- @vitest browser: >= 5.0.0-beta.6, < 5.0.5
- @vitest ui: >= 5.0.0-beta.6, < 5.0.5
- vitejs vite-plus: >= 1.0.0-rc.0, < 1.3.0
- @vitest/ui (npm): from 5.0.0-beta.6 before 5.0.5
- @vitest/browser (npm): from 5.0.0-beta.6 before 5.0.5
- vite-plus (npm): from 1.0.0-rc.0 before 1.3.0

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`

## References

- <https://github.com/vitest-dev/vitest/security/advisories/GHSA-p458-7748-mcp3> (web)
- <https://github.com/vitest-dev/vitest/pull/11578> (web)
- <https://github.com/vitest-dev/vitest/commit/28dc1edfb6ba5a181fe208576989063795aeadb3> (web)
- <https://github.com/vitest-dev/vitest/releases/tag/v5.0.5> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-112948> (advisory)
- <https://github.com/vitest-dev/vitest> (package)

## Sources

- CVE List: [CVE-2026-112948](https://www.cve.org/CVERecord?id=CVE-2026-112948), CVE Terms of Use, modified 2026-10-20
- GitHub Advisory Database: [GHSA-p458-7748-mcp3](https://github.com/advisories/GHSA-p458-7748-mcp3), CC-BY-4.0, modified 2026-10-21
- NVD: [CVE-2026-112948](https://nvd.nist.gov/vuln/detail/CVE-2026-112948), Public domain, modified 2026-10-20

---

Page: https://cve.day/CVE-2026-112948 · Whole record: https://cve.day/CVE-2026-112948.json · Rebuilt by cve.day 2026-11-25T22:59:46.060Z
