Skip to content
Heist/ feed
Medium

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

Type: advisorySource: Official CVE List1 source record

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.

Announced Source revision 1
Original source ↗

CVE-2026-112950

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-112950

vitest

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

mocker

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "vitest-dev",
    "product": "vitest",
    "versions": [
      {
        "status": "affected",
        "version": ">= 4.1.11, < 4.1.12"
      },
      {
        "status": "affected",
        "version": ">= 5.0.0-rc.2, < 5.0.3"
      }
    ]
  },
  {
    "vendor": "@vitest",
    "product": "mocker",
    "versions": [
      {
        "status": "affected",
        "version": ">= 4.1.11, < 4.1.12"
      },
      {
        "status": "affected",
        "version": ">= 5.0.0-rc.2, < 5.0.3"
      }
    ]
  }
]
Related CVEs
CVE-2026-112950

Source reference: /cveMetadata/cveId

Publisher severity

medium

Source reference: /containers/cna/metrics

Event
#42258 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement