CVE-2026-112948: CWE-200: Exposure of Sensitive Information to an Unauthorized Actor in vitest-dev vitest
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.
CVSS v3.1
Score 6.5medium
Affected software
vitest-dev
vitest
@vitest
browser
@vitest
ui
vitejs
vite-plus
pkg:npm/vitest-dev/vitestRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Vitest, a testing framework powered by Vite, has a vulnerability (CVE-2026-112948) in versions >=5.0.0-beta.6 <5.0.5 and >=1.0.0-rc.0 <1.3.0 where the dev servers incorrectly apply file system deny rules due to project servers replacing Vite's defaults and the root server adding a secret token file after Vite compiles its matcher. This misconfiguration allows unauthorized actors who can reach the affected UI, Browser Mode, or API server to access denied project files and a fallback API token located at node_modules/.vitest/.vitest-secret-token. Furthermore, Browser Mode with test.projects can expose environment variables (.env) that are JavaScript-compatible to malicious websites. The vulnerability is classified under CWE-200 (Exposure of Sensitive Information) and CWE-552 (Files or Directories Accessible to External Parties). The issue has been resolved in version 5.0.5.
Potential Impact
An attacker able to access the affected Vitest dev server interfaces can read sensitive files that should be protected, including a fallback API token, potentially compromising security. Exposure of environment variables through Browser Mode can leak sensitive configuration data to malicious websites. This can lead to unauthorized information disclosure without requiring privileges or authentication, but user interaction (UI access) is needed.
Mitigation Recommendations
Upgrade Vitest to version 5.0.5 or later, where this vulnerability is fixed. No other specific mitigations are indicated by the vendor advisory. Patch status is confirmed fixed in 5.0.5.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-19T21:30:47.245Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6ad789f62cdf04f6563b8496
Added to database: 10/20/2026, 15:34:14 UTC
Last enriched: 10/20/2026, 15:49:06 UTC
Last updated: 10/20/2026, 19:06:08 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.