Read the docs
TI-2026-57984 Aliases CVE-2026-84373GHSA-82fw-gwwq-j7x9

Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock

Priority LOW 27CWE-22Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
Information disclosure
Confidentiality · integrity · availability
High · None · None
Fix status
Partial Red Hat: 8 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-22 and the CVSS impact.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00527 44th percentileScored 2026-11-07
Fix Partial vitest (vitest-dev): 4.1.11, 5.0.0-rc.2mocker (@vitest): 4.1.11, 5.0.0-rc.2+2 more productsRed Hat: 8 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
vitest-devvitest2.1.0 to before 4.1.11; 5.0.0-beta.1 to before 5.0.0-rc.24.1.11, 5.0.0-rc.2Patch availableCNA
@vitestmocker2.1.0 to before 4.1.11; 5.0.0-beta.1 to before 5.0.0-rc.24.1.11, 5.0.0-rc.2Patch availableCNA
—@vitest/mocker (npm)2.1.0 to before 4.1.114.1.11Patch availableGHSA-82fw-gwwq-j7x9
—vitest (npm)2.1.0 to before 4.1.114.1.11Patch availableGHSA-82fw-gwwq-j7x9
—vitest (npm)5.0.0-beta.1 to before 5.0.0-rc.25.0.0-rc.2Patch availableGHSA-82fw-gwwq-j7x9
—@vitest/mocker (npm)5.0.0-beta.1 to before 5.0.0-rc.25.0.0-rc.2Patch availableGHSA-82fw-gwwq-j7x9
  • vitest Vendorvitest-dev Affected 2.1.0 to before 4.1.11; 5.0.0-beta.1 to before 5.0.0-rc.2 Fixed in 4.1.11, 5.0.0-rc.2 Patch available CNA
  • mocker Vendor@vitest Affected 2.1.0 to before 4.1.11; 5.0.0-beta.1 to before 5.0.0-rc.2 Fixed in 4.1.11, 5.0.0-rc.2 Patch available CNA
  • @vitest/mocker (npm) Vendor— Affected 2.1.0 to before 4.1.11 Fixed in 4.1.11 Patch available GHSA-82fw-gwwq-j7x9
  • vitest (npm) Vendor— Affected 2.1.0 to before 4.1.11 Fixed in 4.1.11 Patch available GHSA-82fw-gwwq-j7x9
  • vitest (npm) Vendor— Affected 5.0.0-beta.1 to before 5.0.0-rc.2 Fixed in 5.0.0-rc.2 Patch available GHSA-82fw-gwwq-j7x9
  • @vitest/mocker (npm) Vendor— Affected 5.0.0-beta.1 to before 5.0.0-rc.2 Fixed in 5.0.0-rc.2 Patch available GHSA-82fw-gwwq-j7x9

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:*:*:*——vitest-dev
  • cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:*:*:* Versions — — ·vitest-dev

Remediation

  • Fix · CNA vitest (vitest-dev) Fixed in 4.1.11, 5.0.0-rc.2
  • Fix · CNA mocker (@vitest) Fixed in 4.1.11, 5.0.0-rc.2
  • Fix · GHSA-82fw-gwwq-j7x9 @vitest/mocker (npm) Fixed in 4.1.11 Advisory →
  • Fix · GHSA-82fw-gwwq-j7x9 vitest (npm) Fixed in 4.1.11 Advisory →
  • Fix · GHSA-82fw-gwwq-j7x9 vitest (npm) Fixed in 5.0.0-rc.2 Advisory →
  • Fix · GHSA-82fw-gwwq-j7x9 @vitest/mocker (npm) Fixed in 5.0.0-rc.2 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat AMQ Broker 7AffectedNo fix yet: Fix deferred
Red Hat Ansible Automation Platform 2AffectedNo fix yet: Fix deferred
Red Hat Build of KeycloakAffectedNo fix yet: Fix deferred
Red Hat Build of Podman DesktopAffectedNo fix yet: Fix deferred
Red Hat Enterprise Linux 10AffectedNo fix yet: Fix deferred
Red Hat JBoss Enterprise Application Platform 8AffectedNo fix yet: Fix deferred
Red Hat JBoss Enterprise Application Platform Expansion PackAffectedNo fix yet: Fix deferred
Red Hat Trusted Artifact SignerAffectedNo fix planned: Out of support scope
Not affected: 1 product
  • Red Hat Hardened Images

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-84373
  2. 2026-10-03 Alias added: GHSA-82fw-gwwq-j7x9

References

  • TI-2026-38677 Vitest: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE CVSS 3.1CRITICAL 9.8
  • TI-2026-34992 Vitest: Arbitrary file can be read and executed when Vitest UI server is listening CVSS 3.1CRITICAL 9.8
  • TI-2026-34991 Vitest browser mode serves unsanitized otelCarrier query parameter as inline script CVSS 3.1CRITICAL 9.6
  • TI-2025-18644 Remote Code Execution when accessing a malicious website while Vitest API server is listening CVSS 3.1CRITICAL 9.7
  • TI-2025-18643 Browser mode serves arbitrary files in vitest CVSS 3.1HIGH 7.5
  • TI-2026-76917 Backslash traversal in Vitest mocker exposes files on Windows CVSS 3.1MEDIUM 5.9
See all 9 →

Sources