CVE-2026-112950: Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix

Published Oct 20, 2026
·
Updated

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 Software

1 affected component
Vitest vitest>=4.1.11<4.1.12, >=5.0.0<5.0.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Vitest to a version that resolves this vulnerability.

    Fixed in 4.1.12
  2. Upgrade

    Upgrade Vitest to a version that resolves this vulnerability.

    Fixed in 5.0.3

Event History

Oct 20, 2026
CVE Published
via MITRE·03:21 PM
Data Sourced
via MITRE·03:21 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

The issue affects Vitest running on Windows when a client can reach the Vite development server. The vulnerable behavior can expose files outside server.fs.allow that are readable by the Vitest process.

2

What does an attacker need to exploit it?

An unauthenticated client must be able to reach the Vite dev server and register a redirect mock containing backslash traversal. Exploitation also depends on the target file being accessible to the Vitest process.

3

Are all affected-version installations vulnerable by default?

The provided information identifies Windows deployments with reachable Vite dev servers as the relevant exposure condition. It does not establish whether the server is reachable by default or whether redirect mock registration is enabled in every configuration.

4

What versions contain the fix?

The issue is fixed in Vitest 4.1.12 and 5.0.3. Versions from 4.1.11 up to, but excluding, those fixed releases are affected according to the advisory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203