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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.5
- **CVSS:** 6.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.46% (percentile 32, 2026-11-28)
- **CWE:** CWE-200, CWE-552
- **Aliases:** GHSA-p458-7748-mcp3
- **Published:** 2026-10-20T15:15:01.927Z
- **Modified:** 2026-10-21T20:01:39.862Z

## Who should check

- Projects that depend on npm package @vitest/ui (\>= 5.0.0-beta.6, \< 5.0.5)
- Projects that depend on npm package @vitest/browser (\>= 5.0.0-beta.6, \< 5.0.5)
- Projects that depend on npm package vite-plus (\>= 1.0.0-rc.0, \< 1.3.0)
- Anyone running vitest-dev vitest \>= 5.0.0-beta.6, \< 5.0.5
- Anyone running @vitest browser \>= 5.0.0-beta.6, \< 5.0.5
- Anyone running @vitest ui \>= 5.0.0-beta.6, \< 5.0.5
- Anyone running vitejs vite-plus \>= 1.0.0-rc.0, \< 1.3.0

## 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.

## Affected and fixed versions

- npm `@vitest/ui`: affected \>= 5.0.0-beta.6, \< 5.0.5; fixed 5.0.5 (osv)
- npm `@vitest/browser`: affected \>= 5.0.0-beta.6, \< 5.0.5; fixed 5.0.5 (osv)
- npm `vite-plus`: affected \>= 1.0.0-rc.0, \< 1.3.0; fixed 1.3.0 (osv)
- vitest-dev vitest: \>= 5.0.0-beta.6, \< 5.0.5 (cvelist)
- @vitest browser: \>= 5.0.0-beta.6, \< 5.0.5 (cvelist)
- @vitest ui: \>= 5.0.0-beta.6, \< 5.0.5 (cvelist)
- vitejs vite-plus: \>= 1.0.0-rc.0, \< 1.3.0 (cvelist)

## Mitigation

- Upgrade @vitest/ui to 5.0.5 or later.
- Upgrade @vitest/browser to 5.0.5 or later.
- Upgrade vite-plus to 1.3.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-112948. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-112948.md
Affected: @vitest/ui >= 5.0.0-beta.6, < 5.0.5; @vitest/browser >= 5.0.0-beta.6, < 5.0.5; vite-plus >= 1.0.0-rc.0, < 1.3.0
Fixed in: 5.0.5, 1.3.0

Steps:
1. Search this machine and project for @vitest/ui (npm), @vitest/browser (npm), vite-plus (npm), vitest-dev vitest, @vitest browser, @vitest ui: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-112948 being exploited?

There is no confirmed exploitation: CVE-2026-112948 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.46% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-112948?

Medium: CVSS 6.5 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-112948?

@vitest/ui \>= 5.0.0-beta.6, \< 5.0.5; @vitest/browser \>= 5.0.0-beta.6, \< 5.0.5; vite-plus \>= 1.0.0-rc.0, \< 1.3.0.

### Is there a fix for CVE-2026-112948?

Yes. Fixed in 5.0.5, 1.3.0. Upgrade @vitest/ui to 5.0.5 or later. Upgrade @vitest/browser to 5.0.5 or later. Upgrade vite-plus to 1.3.0 or later.

### How do I check if I'm affected by CVE-2026-112948?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-112948>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-p458-7748-mcp3> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-112948> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-112948>
