Back to the CVE list
CVE-2026-84373

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

CVSS score

5.9

EPSS probability

%0.5

Risk score

0.0

Published

1 mo ago

Official patch verified

Etkilenen ürün ve sürüm için yayımlanan güvenlik güncellemesini uygulayın.

Impact on My Inventory

Only the personal products you have added to your account are assessed; an organisation's inventory does not appear here.

Checking session…

Vulnerability description

DayBreach CVE AI Research

CVE-2026-84373 has vendor, distribution, patch and security-source records on file. We can compare them and prepare an explanation linked to the evidence.

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.

IMPACT: Affected Products and Software

Affected Products

The following products are affected by CVE-2026-84373 vulnerability. Where our threat engine knows the exact affected versions, they are listed below.

IDVENDORPRODUCTACTION
1vitest.devvitest View
2@vitestmocker View
3npm@vitest/mocker View
4npmvitest View
5npmvitest View
6npm@vitest/mocker View
7npmvitest View
8npm@vitest/mocker View
9npmvitest View
10npmvitest View
11npm@vitest/mocker View
Total affected vendors: 3|Products: 11

RED HAT CSAF/VEX: Product Impact Check

Red Hat has not yet published a CSAF/VEX impact record for this CVE. This does not mean “not affected”.

SCORING: CVSS from Multiple Sources

CVSS Scores

The Common Vulnerability Scoring System is a standardised framework for assessing the severity of vulnerabilities in software and systems. We collect and display CVSS scores from several sources for each CVE.

SCOREVERSIONSEVERITYVECTORSOURCE
5.9CVSS V3_1MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NCVE CNA
5.9CVSS V31MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NNVD
5.9CVSS 3.x—Vector not publishedGitHub Advisory
0.0CVSS 4.0—Vector not publishedGitHub Advisory

Patch and Remediation Guide

Solution & Remediation Advisory

Patch verified

6 doğrulanmış yama veya düzeltilmiş sürüm kanıtı bulundu.

osv@vitest/mocker4.1.11

OSV düzeltilmiş sürüm: 4.1.11

osvvitest4.1.11

OSV düzeltilmiş sürüm: 4.1.11

osvvitest5.0.0-rc.2

OSV düzeltilmiş sürüm: 5.0.0-rc.2

osv@vitest/mocker5.0.0-rc.2

OSV düzeltilmiş sürüm: 5.0.0-rc.2

gitlabnpm/vitest4.1.11

GitLab Advisory düzeltilmiş sürüm: 4.1.11

gitlabnpm/vitest5.0.0-rc.2

GitLab Advisory düzeltilmiş sürüm: 5.0.0-rc.2

gitlab

Upgrade to versions 4.1.11, 5.0.0-rc.2 or above.

canonical

Upgrade to versions 4.1.11, 5.0.0-rc.2 or above.

Confirm the affected product and version against the source evidence above.
Restrict access to internet-facing services and apply network segmentation.
Apply the official update named in the evidence only to the matching product and version.
Monitor server logs and network endpoints for signs of anomalous execution.

Public exploit and active exploitation status

Verified exploit intelligence

No verified public PoC, exploit repository or Metasploit module has been found for this CVE yet.

Weakness Classification and Attack Patterns (CWE & CAPEC)

CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorises the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-84373 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-84373 weaknesses.

Attack Vector and Accessibility

ExposureAğ üzerinden
PermissionsGerekmiyor
UserGerekmiyor

Official Sources and Advisories

CVSS Vector Radar Chart

5.9 / 10
Attack VectorNetworkComplexityHighPrivilegesNoneUser Interact.NoneConfidentialityHighIntegrityNoneAvailabilityNone

Vulnerability Scoring Details

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone required
User InteractionNone required
Confidentiality (Gizlilik)High
Integrity (Bütünlük)None
Availability (Erişilebilirlik)None

Yama doğrulandı

6 doğrulanmış yama veya düzeltilmiş sürüm kanıtı bulundu.

Follow the vendor

@
@vitest logo
@vitest
N
npm logo
npm

Weakness Type (CWE & CAPEC)

Similar Vulnerabilities

Get this vulnerability through the API

Affected products, version ranges, exploitation status and patch information in a single request, with a free key.

curl -H "x-api-key: $DAYBREACH_API_KEY" \
  "https://api.daybreach.dev/api/v1/intel/cves/CVE-2026-84373"