Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix
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.
- Products
- mocker, vitest
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-112950
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 10:46 UTC · Revision 2
Source evidence
Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix
core-cve · Original sourcePublished 20 Oct 2026, 15:21 UTC
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.
cve:CVE-2026-112950
vitest
Fixed versions: Not specified
mocker
Fixed versions: Not specified
Complete source record
{
"id": "c67733ec16018b0dae67c9097afc3157c12f79d02ed36fde005b73cf1950ca8b",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-112950",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix",
"summary": "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.",
"evidence": "cve:CVE-2026-112950",
"products": [
{
"name": {
"value": "vitest",
"evidence": "/containers/cna/affected/0/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
},
{
"name": {
"value": "mocker",
"evidence": "/containers/cna/affected/1/product"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2026-112950",
"aliases": [
"CVE-2026-112950"
],
"metrics": [
{
"cvssV3_1": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 5.9,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N",
"integrityImpact": "NONE",
"userInteraction": "NONE",
"attackComplexity": "HIGH",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
}
}
],
"affected": [
{
"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"
}
]
}
],
"modified": "2026-10-28T14:04:58.744Z",
"provider": "cve",
"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"
],
"provider_metadata": {
"adp": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2026-112950",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2026-10-28T14:04:50.974371Z"
}
}
}
],
"references": [
{
"url": "https://github.com/vitest-dev/vitest/security/advisories/GHSA-xp26-3454-mjgp",
"tags": [
"exploit"
]
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2026-10-28T14:04:58.744Z"
}
}
],
"cna": {
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M",
"dateUpdated": "2026-10-20T15:21:32.396Z"
}
}
},
"related_cves": [
{
"value": "CVE-2026-112950",
"evidence": "/cveMetadata/cveId"
}
],
"security_relevant": true,
"severity_evidence": "/containers/cna/metrics"
},
"source_id": "core-cve",
"document_id": 447320,
"published_at": "2026-10-20T15:21:32.396+00:00"
}