CVE-2026-112950

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

  • Medium 5.9

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.

Key facts

Published
20 Oct 2026
Last changed
28 Oct 2026
Assigned by
GitHub_M
EPSS
0.542% likely to be exploited in the next 30 days, higher than 46.269% of CVEs (scores for 18 Nov 2026)
SSVC (CISA)
Exploitation: poc; Automatable: no; Technical impact: partial

Severity scores

Each score is shown as its source gave it. They are not averaged or merged.

  • 5.9CVSS 3.1, Mediumfrom the CNA (GitHub_M)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Historical context and remediation

This reference retains the original CVE publication date. A recent record update does not mean a new attack occurred.

No separately sourced impact summary is available on this page yet. Consult the description, version data and dated exploitation evidence.

No explicit remediation statement is available on this page yet. Consult the original record and vendor references before choosing a fix.

Version statuses below come from the CNA. An “unaffected” version is not necessarily a currently supported release or proof of a patch date. EPSS is a dated risk estimate, not a count of historical attacks.

Read the original CVE record.

Affected products

VendorProductVersions
vitest-devvitest
  • >= 4.1.11, < 4.1.12 (affected)
  • >= 5.0.0-rc.2, < 5.0.3 (affected)
@vitestmocker
  • >= 4.1.11, < 4.1.12 (affected)
  • >= 5.0.0-rc.2, < 5.0.3 (affected)

Timeline

  1. 20 Oct 2026 Published

Weakness

Practice this bug class

HackZoneLabs has a hands-on lab on Path traversal (CWE-22).

References