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

Goal: 1000 CNY · Raised: 1336 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 是一个由 Vite 驱动的测试框架。在从 2.1.0 到 4.1.11 和 5.0.0-rc.2 版本中,位于 中的公开导出的 和独立的 ,在 Vite 的未认证 HMR WebSocket 上注册了 处理器,但未针对文件服务白名单对重定向目标进行校验。具体实现中,处理 时,没有通过 来强制执行 和 配置。能够访问已暴露的开发服务器的远程客户端可以提交一个包含 段的、不透明的 URL 协议,导致 解析到项目根目录之外。随后,该插件的 钩子会将 的结果作为模块源码返回,从而泄露开发服务器进程可读的本地文

CVSS 5.9 · Medium
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

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

登录查看更多情报信息。

Other References for CVE-2026-84373 (8)

IV. Related Vulnerabilities

V. Comments for CVE-2026-84373

No comments yet


Leave a comment