Skip to main content

Vitest CVE-2026-73653

| EUVDEUVD-2026-58197 CRITICAL
Path Traversal (CWE-22)
2026-08-13 GitHub_M GHSA-p63j-vcc4-9vmv
9.4
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach network-exposed Browser Mode API
  2. Delivery
    Send crafted provider command with traversal path
  3. Exploit
    Bypass allowWrite and project-root confinement
  4. Execution
    Read, overwrite, or delete arbitrary file
  5. Impact
    Exfiltrate secrets or tamper with host files

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires network reachability to the Browser Mode API - specifically a non-default configuration where test.api.host is set or the Vite dev server is otherwise reachable from another machine or origin (the localhost-only default leaves no untrusted party in position). Given that reachability, no authentication is needed (CVSS PR:N) and no user interaction, and the flaw works even with allowWrite:false because the vulnerable upload, takeScreenshot, screenshotMatcher, stopChunkTrace, deleteTracing, and annotateTraces commands never consult that gate. Limiting factors: the target must run an affected @vitest/browser version (<3.2.7, 4.0.0-4.1.9, or 5.0.0-beta.1-beta.5) with Browser Mode enabled and network-exposed; write/delete operations cannot set attacker-chosen file contents (only PNG/trace outputs), so weaponization beyond overwrite/delete/read is constrained.

Impact

The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L, base 9.4) portrays a network, unauthenticated, no-interaction attack with high confidentiality/integrity impact - a critical rating. However, the vendor advisory materially qualifies this: exploitation only matters when the Browser Mode API is exposed beyond localhost (e.g. test.api.host set or the dev server reachable from another origin/machine), and on a default localhost-only setup with trusted test code there is no untrusted party positioned to exploit it. The AV:N is therefore accurate only for the non-default network-exposed configuration; in the common local case real-world risk is much lower than 9.4 implies. No EPSS score, KEV entry, or SSVC decision was provided, and no public exploit is identified, so there is no signal of active or automatable exploitation. Note also that the write/delete primitives cannot place attacker-chosen content (they emit PNGs or trace zips), so the I:H reflects arbitrary create/overwrite/delete rather than payload injection; the truly serious primitive is arbitrary file read via upload/annotateTraces. Overall: a genuine critical for internet- or LAN-exposed Browser Mode deployments and CI runners relying on allowWrite:false to sandbox untrusted test code, but low practical risk for standard local developer usage.

Exploit ScenarioDerived

An attacker who can reach a network-exposed Vitest Browser Mode server (for example a CI runner or a dev machine where test.api.host has been set) sends a provider command such as upload referencing /etc/passwd or a CI secrets file; the Node side reads the file and loads its contents into the page where the attacker's test code exfiltrates it. The same access allows overwriting or deleting arbitrary files via takeScreenshot/stopChunkTrace/deleteTracing. No public exploit code is identified, and the attack requires the API to be reachable beyond localhost.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 13, 2026

Path traversal in Vitest Browser Mode (@vitest/browser) lets any client reachable via the Browser Mode API read, create, overwrite, or delete arbitrary files on the host running the test process, bypassing the allowWrite permission gate entirely. Affected are Vitest before 3.2.7, 4.x before 4.1.10, and the 5.0.0-beta line before 5.0.0-beta.6, where provider commands (upload, takeScreenshot, screenshotMatcher, stopChunkTrace, deleteTracing, annotateTraces) accept browser-supplied paths without confining them to the project root. There is no public exploit identified at time of analysis and it is not in CISA KEV; the highest-impact primitive is the upload command's arbitrary file read.

RemediationAI

Vendor-released patch: upgrade @vitest/browser to 3.2.7, 4.1.10, or 5.0.0-beta.6 depending on your major line, per the GHSA advisory (https://github.com/vitest-dev/vitest/security/advisories/GHSA-p63j-vcc4-9vmv) and the fix PRs https://github.com/vitest-dev/vitest/pull/10674 and https://github.com/vitest-dev/vitest/pull/10679. Until you can patch, do not expose the Browser Mode API to the network: leave test.api.host unset so the server binds to localhost only, and restrict/firewall the dev-server port so only the local trusted machine can reach it - this closes the remote attack surface at the cost of losing remote/containerized browser access. Additionally, treat allowWrite:false as insufficient containment for untrusted test code on affected versions (the vulnerable commands ignore it), so avoid running untrusted tests in Browser Mode until upgraded. After patching, keeping allowWrite:false continues to gate write/delete operations as intended.

Affected VersionsENISA

vitest < 3.2.7
vitest 5.0.0-beta.1, < 5.0.0-beta.6
vitest 4.0.0, < 4.1.10

Affected Packages

npm @vitest/browser fix: 3.2.7, 4.1.10, 5.0.0-beta.6
euvd vitest fix: 3.2.7, 4.1.10
euvd vitest_5_0_0_beta_1 fix: 5.0.0-beta.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Vitest is a Vite-powered JavaScript/TypeScript testing framework; its Browser Mode (npm package @vitest/browser) runs tests in a real browser while a Node.js-side command bridge performs privileged filesystem operations on behalf of the browser (screenshots, Playwright/WebdriverIO uploads, trace management, screenshot matching). The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory): the file-touching provider commands trusted absolute or ../-containing paths supplied by the browser client and neither validated them against the project root (Vite server.fs strict checks) nor enforced the allowWrite gate. Per the CPE cpe:2.3:a:vitest-dev:vitest, only the vitest/@vitest/browser package is affected. The fix (PRs 10674/10679/10680) centralizes two guards - assertBrowserApiWrite (enforces allowWrite for write/delete) and assertBrowserFileAccess (confines paths using isFileLoadingAllowed) - and applies them to every provider command including the previously-bypassing upload, screenshot, and trace commands.

Know when Vitest gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 9.4 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
vuln.today AI 9.4 CRITICAL

Network-reachable API with no auth or interaction (AV:N/PR:N/UI:N); arbitrary file read gives C:H, create/overwrite/delete gives I:H, and file deletion yields limited A:L.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
Red Hat 9.4 CRITICAL

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

Lifecycle Timeline

2
Patch available
Aug 13, 2026 - 19:04 EUVD
CVE Published
Aug 13, 2026 - 18:19 cve.org
CRITICAL 9.4

DescriptionCVE.org

Vitest is a testing framework powered by Vite. Prior to versions 3.2.7, 4.1.10, and 5.0.0-beta.6, Browser Mode provider commands including upload, takeScreenshot, screenshotMatcher, stopChunkTrace, deleteTracing, and annotateTraces accept browser-supplied file paths without enforcing the allowWrite permission gate or confining paths to the project root. A client that can reach the Browser Mode API can read arbitrary local files, create or overwrite image and trace files, or delete files accessible to the Vitest process even when allowWrite is false. This issue is fixed in versions 3.2.7, 4.1.10, and 5.0.0-beta.6.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 3 npm packages depend on @vitest/browser (3 direct, 0 indirect)

Ecosystem-wide dependent count for version 4.0.0.

Executive ViewAI

Why It Matters

Vitest Browser Mode (@vitest/browser) contains a critical vulnerability (CVSS 9.4) that enables attackers to read, write, or delete arbitrary files on the host system running tests, bypassing security controls designed to prevent such access. Affected organizations running Vitest versions before 3.2.7, 4.0.0-4.1.9, or 5.0.0-beta-5 face immediate risk to test data, source code, secrets, and build infrastructure. No vendor-released patch identified at time of analysis.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include: (1) Restrict network access to all Vitest Browser Mode instances to whitelisted, trusted networks using firewalls or network segmentation; (2) Disable Browser Mode feature entirely unless actively required for testing operations; (3) Run affected test infrastructure in isolated containers or virtual machines without access to production credentials, source repositories, or sensitive configuration files; (4) Implement file system access controls using OS-level permissions to restrict test process file access to specific necessary directories; (5) Enable comprehensive logging and monitoring of file access patterns from test processes to detect suspicious activity indicating exploitation attempts.

Threat Intelligence Overview

EPSS Score
0.6%
Top 52% exploitable
Prevalence
High
Vitest is a very widely used JS test framework, but Browser Mode is an opt-in subset
Threat Intel
1
1 source
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

48
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +47
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy