Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-84373— Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock

Quick assessment

Affected
vitest-dev vitest
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

vitest.dev vitest是vitest.dev团队开源的一款前端测试框架。 vitest.dev vitest 2.1.0版本至4.1.11之前版本和5.0.0-beta.1版本至5.0.0-rc.2之前版本存在路径遍历漏洞,该漏洞源于路径处理不当,未正确验证重定向目标,可能导致路径遍历攻击,泄露开发服务器进程可读取的本地文件。

CVSS 5.9 · Medium EPSS 0.53% · P44

Affected Version Matrix 4

VendorProduct Version RangeStatus
@vitest mocker >= 2.1.0, < 4.1.11 affected
>= 5.0.0-beta.1, < 5.0.0-rc.2 affected
vitest-dev vitest >= 2.1.0, < 4.1.11 affected
>= 5.0.0-beta.1, < 5.0.0-rc.2 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-84373

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
对路径名的限制不恰当(路径遍历)
Source: CVE Program / CVE List V5
Vulnerability Title
vitest.dev vitest 路径遍历漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
vitest.dev vitest是vitest.dev团队开源的一款前端测试框架。 vitest.dev vitest 2.1.0版本至4.1.11之前版本和5.0.0-beta.1版本至5.0.0-rc.2之前版本存在路径遍历漏洞,该漏洞源于路径处理不当,未正确验证重定向目标,可能导致路径遍历攻击,泄露开发服务器进程可读取的本地文件。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
vitest-dev vitest >= 2.1.0, < 4.1.11 -
@vitest mocker >= 2.1.0, < 4.1.11 -

II. Public POCs for CVE-2026-84373

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-84373

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-84373 (5)

Vendor Advisories for CVE-2026-84373 (1)

Vendor Pages for CVE-2026-84373 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-84373

No comments yet


Leave a comment