Skip to main content

CVE-2026-112948: CWE-200: Exposure of Sensitive Information to an Unauthorized Actor in vitest-dev vitest

0
Medium
VulnerabilityCVE-2026-112948cvecve-2026-112948cwe-200cwe-552
Published: 10/20/2026 (10/20/2026, 15:15:01 UTC)
Source: CVE Database V5
Vendor/Project: vitest-dev
Product: 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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Affected software

vitest-dev

vitest

Affected versions
>=5.0.0-beta.6 <5.0.5

@vitest

browser

Affected versions
>=5.0.0-beta.6 <5.0.5

@vitest

ui

Affected versions
>=5.0.0-beta.6 <5.0.5

vitejs

vite-plus

Affected versions
>=1.0.0-rc.0 <1.3.0
vitest-dev/vitest
pkg:npm/vitest-dev/vitest
Affected versions
>=5.0.0-beta.6 <5.0.5>=1.0.0-rc.0 <1.3.0

Run 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

AILast updated: 10/20/2026, 15:49:06 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses