CVE-2026-84373: Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock
Vulnerability summary
CVE-2026-84373 is a medium (CVSS 5.9) vulnerability in vitest-dev vitest. EPSS estimates a 0.48% chance of exploitation in the next 30 days, higher than 43% of scored vulnerabilities.
Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources
CIRCL last checked 05-12-2026
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 2 · Related 2Timeline
- 01-09-2026PublishedVulnerability first disclosed.
- 02-09-2026Last modifiedVulnerability information updated.
Description
Vitest is a testing framework powered by Vite. From 2.1.0 until 4.1.11 and 5.0.0-rc.2, the public mockerPlugin and standalone interceptorPlugin exports in packages/mocker/src/node/interceptorPlugin.ts register the vitest:interceptor:register handler on Vite's unauthenticated HMR WebSocket without validating redirect targets against the file-serving allowlist. The implementation processes event.redirect without enforcing server.fs.allow and server.fs.deny through isFileLoadingAllowed. A remote client that can reach an exposed development server can submit an opaque URL scheme preserving .. segments, causing join(server.config.root, redirectUrl.pathname) to resolve outside the project root. The plugin's load hook then returns readFile(mock.redirect, 'utf-8') as module source, disclosing local files readable by the dev-server process. Vitest browser mode uses a token-authenticated RPC and is not remotely unauthenticated by default, although the same boundary check was missing on that path. This issue is fixed in versions 4.1.11 and 5.0.0-rc.2.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · WolfiEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · NpmEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · ChainguardEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- NVDNIST5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS trend
Probability
0.48%
Chance of exploitation in the next 30 days
Percentile
43%
Versus all other CVEs
30-day change
Decrease -0.05 pp
From 0.53% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard33 products
- commercial-gitlab-rails-ee-19.1< 19.1.7-r3
- commercial-gitlab-rails-ee-19.2< 19.2.7-r1
- commercial-gitlab-rails-ee-19.3< 19.3.3-r1
- commercial-gitlab-rails-ee-19.4< 19.4.1-r1
- commercial-gitlab-rails-ee-fips-19.1All versions (No fix recorded) | < 19.1.9-r0
Wolfi4 products
- langfuse-3-compat< 3.225.7-r6
- langfuse-3-worker< 3.225.7-r6
- vitess-24< 24.0.3-r7
- vitess-24-compat< 24.0.3-r7
@vitest2 products
- mocker≥ 2.1.0, < 4.1.11 | ≥ 5.0.0-beta.1, < 5.0.0-rc.2
- mocker≥ 2.1.0, < 4.1.11 | ≥ 5.0.0-beta.1, < 5.0.0-rc.2
Npm1 product
- vitest≥ 2.1.0, < 4.1.11 | ≥ 5.0.0-beta.1, < 5.0.0-rc.2
Vitest-dev1 product
- vitest≥ 2.1.0, < 4.1.11 | ≥ 5.0.0-beta.1, < 5.0.0-rc.2
5 vendors · 41 products
References
11 linksShow all 11 references
- github.com/vitest-dev/vitestPACKAGE