CVE-2026-112950

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

Published Oct 20, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-xp26-3454-mjgp Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Vitest.dev
Vitest.dev mocker
Vitest.dev vitest
Vendors & Products Vitest.dev
Vitest.dev mocker
Vitest.dev vitest
Type Values Removed Values Added
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.
Title Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix
Weaknesses CWE-22
References
Metrics cvssV3_1

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

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 28, 2026, 2:04 PM
Reserved
Oct 19, 2026, 9:30 PM
Status
Awaiting Analysis
Published
Oct 20, 2026, 4:17 PM
Modified
Oct 28, 2026, 2:16 PM