CVE-2026-112950

Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix

MEDIUM
5.9
CVSS Score
Published: October 20, 2026 at 03:21 PM UTC
Updated: October 20, 2026 at 07:56 PM UTC
2 products affected across 2 vendorsVitestMocker

Using vitest by vitest-dev?

Get instant alerts when new vulnerabilities affect vitest - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.9
Exploit prediction
EPSS 0.5%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

>= 4.1.11, < 4.1.12>= 5.0.0-rc.2, < 5.0.3
>= 4.1.11, < 4.1.12>= 5.0.0-rc.2, < 5.0.3

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

CVSS

5.9MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
HIGH
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusAWAITING ANALYSIS
CWE
CWE-22

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card