CVE-2026-112950
Awaiting Analysis Awaiting Analysis - Queue

Path Traversal in Vitest Testing Framework

Vulnerability report for CVE-2026-112950, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-20

Last updated on: 2026-10-28

Assigner: GitHub, Inc.

Description

Vitest is a Vite-native testing framework for JavaScript and TypeScript projects. From 4.1.11 until 4.1.12 and 5.0.3, isFileLoadingAllowed and the filesystem read interpret backslashes differently on Windows in packages/mocker/src/node/interceptorPlugin.ts. When a client can reach the Vite dev server on Windows and register a redirect mock containing backslash traversal, POSIX joining preserves a Windows backslash traversal that the later filesystem read interprets as a path separator, so the client can read a file outside server.fs.allow that the Vitest process can access. This issue is fixed in versions 4.1.12 and 5.0.3.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-20
Last Modified
2026-10-28
Generated
2026-11-09
AI Q&A
2026-10-20
EPSS Evaluated
2026-11-08
NVD
EUVD

Affected Vendors & Products

Showing 4 associated CPEs
Vendor Product Version / Range
vitest-dev vitest >= 4.1.11, < 4.1.12
vitest-dev vitest >= 5.0.0-rc.2, < 5.0.3
@vitest mocker >= 4.1.11, < 4.1.12
@vitest mocker >= 5.0.0-rc.2, < 5.0.3

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a path traversal bypass in the @vitest/mocker package for Windows systems. It occurs due to inconsistent path normalization between POSIX and Windows. Attackers can register a redirect with a backslash in the URL, which bypasses allowlist checks because POSIX path joining does not normalize backslashes. The filesystem later interprets these backslashes as path separators, allowing unauthorized file reads outside the restricted directory.

Detection Guidance

To detect this vulnerability, inspect Vitest server logs for unusual file access attempts or WebSocket registration with backslash traversal in URLs. Check for files accessed outside the configured root directory. No specific commands are provided in the context.

Impact Analysis

If you run a Vite dev server on Windows using Vitest versions between 4.1.11-4.1.12 or 5.0.0-5.0.2, an attacker with network access could exploit this to read files outside the server's allowed directory. This could expose sensitive data like configuration files or source code.

Compliance Impact

This vulnerability allows unauthorized file reads outside restricted directories on Windows systems, which could lead to exposure of sensitive data. For GDPR, this may violate principles of data minimization and security. For HIPAA, it could compromise protected health information if accessed without authorization.

Mitigation Strategies

Upgrade @vitest/mocker to version 4.1.12 or 5.0.3 or later. If using affected versions, restrict network access to the Vite dev server and monitor file access logs for suspicious activity.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-112950. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...