{"schemaVersion":3,"id":"CVE-2026-112950","aliases":[],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2026-10-20T15:21:32.396Z","modified":"2026-10-20T15:21:32.396Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.9,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.9,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":null,"percentile":null,"severity":"unknown","asOf":null,"change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[],"last30":[]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","description":"The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/22.html"}],"affected":[{"vendor":"vitest-dev","product":"vitest","name":"vitest","label":"vitest","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 4.1.11, < 4.1.12","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.0.0-rc.2, < 5.0.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 4.1.11, < 4.1.12 | ≥ 5.0.0-rc.2, < 5.0.3","eol":null,"hubHref":"/vendor/vitest-dev/vitest"},{"vendor":"@vitest","product":"mocker","name":"mocker","label":"mocker","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 4.1.11, < 4.1.12","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.0.0-rc.2, < 5.0.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 4.1.11, < 4.1.12 | ≥ 5.0.0-rc.2, < 5.0.3","eol":null,"hubHref":"/vendor/vitest/mocker"}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/vitest-dev/vitest/security/advisories/GHSA-xp26-3454-mjgp","label":"github.com/vitest-dev/vitest/security/advisories/GHSA-xp26-3454-mjgp","hostname":"github.com","tags":["X Refsource CONFIRM"]},{"url":"https://github.com/vitest-dev/vitest/commit/15cc006aa9f8683dc5f7e895d011fa7dc751ce35","label":"github.com/vitest-dev/vitest/commit/15cc006aa9f8683dc5f7e895d011fa7dc751ce35","hostname":"github.com","tags":["X Refsource MISC"]},{"url":"https://github.com/vitest-dev/vitest/commit/b825313243dc55757e8d7c0f9e7a792135e13473","label":"github.com/vitest-dev/vitest/commit/b825313243dc55757e8d7c0f9e7a792135e13473","hostname":"github.com","tags":["X Refsource MISC"]},{"url":"https://github.com/vitest-dev/vitest/releases/tag/v4.1.12","label":"github.com/vitest-dev/vitest/releases/tag/v4.1.12","hostname":"github.com","tags":["X Refsource MISC"]},{"url":"https://github.com/vitest-dev/vitest/releases/tag/v5.0.3","label":"github.com/vitest-dev/vitest/releases/tag/v5.0.3","hostname":"github.com","tags":["X Refsource MISC"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-10-20T15:21:32.396Z","label":"Published","detail":"Vulnerability first disclosed.","source":null}],"risk":{"score":24,"level":"low","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T11:57:24.630Z","stale":false,"partial":false}}