CVE-2026-47429

Published Jul 14, 2026

Last updated a day ago

Overview

AI description

Automated description summarized from trusted sources.

CVE-2026-47429 describes a path traversal vulnerability affecting the Vitest UI server. This flaw arises from the incorrect use of the `isFileServingAllowed` function within the API handler for the `/__vitest_attachment__` endpoint, particularly on Windows systems. Attackers can manipulate the `path` parameter to bypass security checks, allowing them to read arbitrary files from the server's filesystem. Beyond arbitrary file reading, the vulnerability extends to arbitrary file write and delete operations through functions like `writeFile`, `removeFile`, and `saveSnapshotFile`. This can ultimately lead to remote code execution when the Vitest UI server is exposed to the network. Mitigations include improved path validation and the introduction of new configuration flags, `allowWrite` and `allowExec`, which are disabled by default when the API server is bound to a non-localhost host.

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.
Source
security-advisories@github.com
NVD status
Awaiting Analysis

Risk scores

CVSS 3.1

Type
Secondary
Base score
9.8
Impact score
5.9
Exploitability score
3.9
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Severity
CRITICAL

Weaknesses

security-advisories@github.com
CWE-22

Social media

Hype score
Not currently trending