Description
Vitest is a testing framework powered by Vite. Prior to 3.2.5 and 4.1.0, the Vitest UI/API server on Windows used isFileServingAllowed incorrectly for /__vitest_attachment__, allowing \\?\\..\\ path traversal to read files outside the project; exposed API write and rerun features such as saveTestFile and rerun could also allow arbitrary script execution. This issue is fixed in versions 3.2.5 and 4.1.0.
Published: 2026-07-14
Score: 9.8 Critical
EPSS: 1.0% Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Vitest, a testing framework powered by Vite, suffers from an issue in its UI/API server on Windows where the isFileServingAllowed flag is incorrectly used for the /__vitest_attachment__ endpoint. This induces a \\?\\..\\ style path traversal that permits reading files outside the project. Furthermore, the exposed API actions like saveTestFile and rerun can be abused to write test files and run scripts, enabling arbitrary code execution. The vulnerability was addressed in releases 3.2.5 and 4.1.0.

Affected Systems

The flaw affects the Vitest development framework from vitest-dev. All installations using versions earlier than 3.2.5 running on Windows are vulnerable. The issue is not present in release 3.2.5 or newer, or 4.1.0 and newer. Users of these older versions should apply the update.

Risk and Exploitability

The CVSS score of 9.8 demonstrates a severe level of risk. The EPSS score of 1% indicates that active exploitation attempts are rare but possible. The vulnerability is not listed in the CISA KEV catalog. Attackers need access to the local Vitest UI/API server—typically bound to localhost—to leverage the path traversal and API endpoints. If the server is exposed over a network, the risk increases markedly; a compromised or malicious user could read sensitive files or run code on the host machine.

Generated by OpenCVE AI on July 31, 2026 at 05:32 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Vitest to version 3.2.5 or newer.
  • Limit the network exposure of the Vitest UI/API server, ensuring it is only accessible from trusted internal interfaces.
  • Configure the server localhost to prevent remote access.
  • Apply strict access controls and authentication if the UI/API must be exposed beyond localhost, and review custom plugins or scripts for path validation to avoid traversal.

Generated by OpenCVE AI on July 31, 2026 at 05:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-5xrq-8626-4rwp When Vitest UI server is listening, arbitrary file can be read and executed
History

Tue, 21 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 16 Jul 2026 00:30:00 +0000

Type Values Removed Values Added
First Time appeared Redhat
Redhat hummingbird
CPEs cpe:/a:redhat:hummingbird:1
Vendors & Products Redhat
Redhat hummingbird
References
Metrics threat_severity

None

threat_severity

Important


Wed, 15 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Vitest.dev
Vitest.dev vitest
Vendors & Products Vitest.dev
Vitest.dev vitest

Tue, 14 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
Description Vitest is a testing framework powered by Vite. Prior to 3.2.5 and 4.1.0, the Vitest UI/API server on Windows used isFileServingAllowed incorrectly for /__vitest_attachment__, allowing \\?\\..\\ path traversal to read files outside the project; exposed API write and rerun features such as saveTestFile and rerun could also allow arbitrary script execution. This issue is fixed in versions 3.2.5 and 4.1.0.
Title Vitest: Arbitrary file can be read and executed when Vitest UI server is listening
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Redhat Hummingbird
Vitest.dev Vitest
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-21T15:02:17.187Z

Reserved: 2026-05-19T19:37:43.527Z

Link: CVE-2026-47429

cve-icon Vulnrichment

Updated: 2026-07-21T15:01:51.918Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-14T19:28:08Z

Links: CVE-2026-47429 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T05:45:03Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')