cve.bz

CVE-2026-47429 vitest.dev vitest: Path traversal

5.9 mediumExploit referenceEPSS 1.0%Fix available

Medium (5.9) in vitest.dev vitest. EPSS 1.0% estimated probability of exploitation activity in the next 30 days. Fixed in vitest 3.2.6, 4.1.0.

On this page
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.

Severity

CVSS 3.1

5.9 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
1.0% (unchanged from 1.0% a week ago; 0.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 65th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: total, assessed 2026-07-21. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-47429 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-47429?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-47429?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-47429 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
vitest.dev:vitestbefore 3.2.5
vitest.dev:vitestfrom 4.0.0 before 4.1.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-5xrq-8626-4rwpnpmvitest>=4.0.0 <4.1.04.1.0
GHSA-5xrq-8626-4rwpnpmvitest<3.2.63.2.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Red Hathummingbird:1prometheus3.130:3.13.1-0.1.hum1RHSA-2026:39058

From the distributions' data via OSV.dev: Red Hat Security Data © Red Hat, Inc., CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Red Hat.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Vitest ships a UI and API server (enabled via the --ui or --api flags, or automatically as part of Browser Mode) that exposes file read, file write, and test-rerun functionality over HTTP. Due to an incorrect path-traversal check in the /__vitest_attachment__ handler and related code paths, a remote attacker who can reach this server can read arbitrary files, and via the write/rerun features can achieve arbitrary code execution. Exploitation requires either exposing the server to a network host (--api.host / api.host config) or running the UI/Browser Mode on Windows.

Red Hat's shipped products use vitest exclusively as a development-time unit test runner (invoked as `vitest run`, `test:unit`, or `--project` in CI/build pipelines). None of the Red Hat products that ship vitest start its UI server, API server, or Browser Mode as part of their build process or shipped runtime. The @vitest/browser package (required for Browser Mode) is not present in any Red Hat product's manifest. As a result, the vulnerable code path is not reachable in any Red Hat product covered by this flaw, and affects are set to NOTAFFECTED / Vulnerable Code not in Execute Path.

Red Hat's mitigation

No mitigation is required for Red Hat products, as none run Vitest's UI/API server or Browser Mode in their build or shipped runtime.

Developers who run `vitest --ui`, `vitest --api`, or Browser Mode interactively should avoid binding the server to a non-localhost host, and should upgrade to vitest >= 4.1.0 (or >= 3.2.5 on the 3.x branch), where the allowWrite/allowExec flags default to disabled whenever the server is bound to a non-localhost host.

ProductPackageStateAdvisory
Red Hat Hardened Imagesprometheus3-13-main-3.13.1-0.1.hum1Fixed 2026-07-13RHSA-2026:39058
Red Hat AMQ Broker 7vitestNot affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/gateway-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/gateway-rhel9Not affected
Red Hat Ansible Automation Platform 2automation-platform-uiNot affected
Red Hat Build of KeycloakvitestNot affected
Red Hat Build of Podman Desktoprh-podman-desktop.gitNot affected
Red Hat JBoss Enterprise Application Platform 8vitestNot affected
Red Hat JBoss Enterprise Application Platform Expansion PackvitestNot affected
Red Hat OpenShift Container Platform 4openshift4/ose-agent-installer-ui-rhel9Not affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-47429.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON