cve.bz

CVE-2026-84373 Path traversal

5.9 mediumEPSS 0.5%Fix available

Medium (5.9). EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in @vitest/mocker 4.1.11, 5.0.0-rc.2.

On this page
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.

Severity

CVSS 3.1

5.9 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
0.5% (unchanged from 0.5% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 46th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-09-02. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • @vitest/mocker (npm): fixed in 4.1.11, 5.0.0-rc.2
  • vitest (npm): fixed in 4.1.11, 5.0.0-rc.2

Ask an AI about this CVE

Show the promptExplain CVE-2026-84373 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-84373?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-84373?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-84373 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
vitest-dev vitest>= 2.1.0, < 4.1.11
vitest-dev vitest>= 5.0.0-beta.1, < 5.0.0-rc.2
@vitest mocker>= 2.1.0, < 4.1.11
@vitest mocker>= 5.0.0-beta.1, < 5.0.0-rc.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-82fw-gwwq-j7x9npm@vitest/mocker>=2.1.0 <4.1.114.1.11
GHSA-82fw-gwwq-j7x9npmvitest>=2.1.0 <4.1.114.1.11
GHSA-82fw-gwwq-j7x9npmvitest>=5.0.0-beta.1 <5.0.0-rc.25.0.0-rc.2
GHSA-82fw-gwwq-j7x9npm@vitest/mocker>=5.0.0-beta.1 <5.0.0-rc.25.0.0-rc.2

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability in Vitest allows an unauthenticated remote attacker to read arbitrary local files on an exposed development server. The flaw stems from a path traversal issue within the HMR WebSocket handler, which fails to properly validate redirect targets. Exploitation is limited to development environments where the Vitest server is accessible from untrusted networks.

Red Hat's mitigation

Restrict network access to development servers running Vitest. Configure firewall rules to limit inbound connections to the Vitest HMR WebSocket port to only trusted internal networks or localhost. This may impact development workflows that rely on remote access to the development server.

ProductPackageStateAdvisory
Red Hat AMQ Broker 7amq-broker-bin.zipFix deferred
Red Hat AMQ Broker 7amq-broker-maven-repository.zipFix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/gateway-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/gateway-rhel9Fix deferred
Red Hat Ansible Automation Platform 2automation-gatewayOut of support scope
Red Hat Ansible Automation Platform 2automation-platform-uiFix deferred
Red Hat Build of Keycloakkeycloak-operator.redhat-00001.zipFix deferred
Red Hat Build of Keycloakrhbk-quarkus-dist.zipFix deferred
Red Hat Build of Podman Desktoprh-podman-desktop.gitFix deferred
Red Hat Enterprise Linux 10rh-podman-desktopFix deferred
Red Hat Hardened Imagesgrafana13.2Not affected
Red Hat Hardened ImagesjaegerNot affected
Red Hat Hardened Imagesopentelemetry-collectorNot affected
Red Hat Hardened Imagesopentelemetry-collector-contribNot affected
Red Hat Hardened Imagesopentelemetry-collector-k8sNot affected
Red Hat Hardened Imagesprometheus3.13Not affected
Red Hat JBoss Enterprise Application Platform 8jboss-eap.1-runtime-maven-repository.zipFix deferred
Red Hat JBoss Enterprise Application Platform 8jboss-eap-runtime-maven-repository.zipFix deferred
Red Hat JBoss Enterprise Application Platform Expansion Packjboss-eap.1-runtime-maven-repository.zipFix deferred
Red Hat JBoss Enterprise Application Platform Expansion Packjboss-eap-runtime-maven-repository.zipFix deferred
1 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-84373.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON