CVE-2026-112948 — Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file
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.
Who exploits it and how urgent it is
A 0–100 score combining confirmed exploitation, ransomware and APT use, public exploits, EPSS and severity.
How the score was calculated
- Technical severity (medium)+3
The score orders the patch queue; it does not replace your asset context (internet exposure, criticality, compensating controls).
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the sources call it.
CISA SSVC assessment CISA
Three decision points CISA publishes for the CVEs it assesses (SSVC 2.0.3). A stakeholder decision, not a severity score.
Remediation
Fixes and mitigations documented by the sources — linked to the original advisory.
No fix documented by the sources we poll. That does not mean none exists: check the vendor advisory.
First 24 hours
Ordered from the record’s own fields — exposure first, because you cannot patch what you have not found. A rule-generated starting point.
- Identify exposed assets running the affected vendor/product/version combinations (@vitest Browser, @vitest Ui, Vitejs Vite-plus…).
- The attack is network-based and needs no privileges: restrict exposure (ACLs, VPN, WAF) until patched.
- No fix documented in the sources: reduce exposure and monitor the vendor advisory.
- Exploitation requires user interaction: tighten email/web filtering and warn affected users.
- Search available logs for exploit probes matching the vulnerability class (info disclosure), errors and authentication anomalies.
Affected scope
Vendor, product and versions as the sources word them.
| Vendor | Product | Versions | Status | Source |
|---|---|---|---|---|
| @vitest | Browser | version >= 5.0.0-beta.6, < 5.0.5 | Vulnerable | CVE Program (cve.org) e CISA ADP |
| @vitest | Ui | version >= 5.0.0-beta.6, < 5.0.5 | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Vitejs | Vite-plus | version >= 1.0.0-rc.0, < 1.3.0 | Vulnerable | CVE Program (cve.org) e CISA ADP |
| Vitest.dev | Vitest | version >= 5.0.0-beta.6, < 5.0.5 | Vulnerable | CVE Program (cve.org) e CISA ADP |
Attack characteristics
The CVSS vector, decoded. It describes the attack, not your exposure to it.
Every base score collected
Sources score independently and may disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Scored by |
|---|---|---|---|---|---|
| 6.5 | CVSS 3.1 | Medium | 2.8 | 3.6 | security-advisories@github.com via NIST National Vulnerability Database |
| 6.5 | CVSS 3.1 | Medium | — | — | GitHub_M via CVE Program (cve.org) e CISA ADP |
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N (score shown at the top: security-advisories@github.com) Weakness MITRE
Weakness class according to MITRE’s CWE catalog.
Detection
Read off the CVSS vector and the weakness class. Starting points, not tested rules.
- Prioritize edge telemetry for the network-reachable component (proxy, WAF, IDS/IPS).
- Look for anomalous data read/export volumes and access to sensitive records.
Timeline
What happened to this CVE, newest first.
- 2026
- Source status changed · Received → Awaiting Analysis
- Affected products added · vitest-dev/vitest, @vitest/browser, @vitest/ui, vitejs/vite-plus
- SSVC assessment updated
- Record published
- CVSS changed · 6.5
- Source status changed · → Received
- Record created in this database
- CVE published
Source activity
Repeated readings are counted rather than listed.
- 1× References added · Oct 20, 2026 – Oct 20, 2026
- 1× Official description updated · Oct 20, 2026 – Oct 20, 2026
References
4 on the record
Elsewhere on this site
Related CVEs (same products)
- Medium CVE-2026-112946 Vite: Files outside `server.fs.allow` could be served when project paths match system paths on non-Windows machine 17h
- Medium CVE-2026-112950 Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix 17h
- Medium CVE-2026-112949 Vitest: Code injection via unauthenticated manual mock registration 17h
- Medium CVE-2026-112947 Vite: First 4 bytes of files outside of `server.fs` setting is exposed by `?vite-wasm-instance` 17h
- Low CVE-2026-112945 Vite: Cross origin script execution through Vite custom middleware 17h
- Medium CVE-2026-112944 launch-editor: Editor CLI flag misinterpretation causing arbitrary command execution for some editors 18h
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No FIRST EPSS score.
- No fixed version, patch or mitigation documented.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record
Text assembled only from the fields above — no additional claims.
What should defenders know first?
CVE-2026-112948 is "Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file", rated Medium. It affects Browser (@vitest); versions are in the scope table. It is not in CISA KEV, which does not rule out exploitation. CVSS 6.5 describes technical severity. First verify whether exposed or business-critical assets run the affected versions, apply vendor fixes or mitigations, and preserve logs for review.
Comments
Moderated technical discussion. Read the community guidelines.
No comments yet.
Sign in or create an account to comment and suggest corrections.