目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CVE-2026-84373— Vitest 通过@vitest/mocker 任意文件读取漏洞

一分钟漏洞结论

影响对象
vitest-dev vitest
利用判断
尚无明确在野利用证据,仍需结合暴露面评估
建议动作
优先检查厂商安全公告和参考链接中的修复版本;无法立即升级时,限制受影响服务暴露并加强监测。

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

CVSS 5.9 · Medium
获取后续新漏洞提醒 登录后订阅

一、 漏洞 CVE-2026-84373 基础信息

漏洞信息

对漏洞内容有疑问?看看神龙的深度分析是否有帮助!
查看神龙十问 ↗

尽管我们使用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。神龙努力确保数据的准确性,但请您根据实际情况进行核实和判断。

Vulnerability Title
Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock
来源: 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.
来源: 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
来源: CVE Program / CVE List V5
Vulnerability Type
对路径名的限制不恰当(路径遍历)
来源: CVE Program / CVE List V5

受影响产品

厂商 产品 影响版本 CPE 订阅
vitest-dev vitest >= 2.1.0, < 4.1.11 -
@vitest mocker >= 2.1.0, < 4.1.11 -

二、漏洞 CVE-2026-84373 的公开POC

# POC 描述 源链接 神龙链接
AI 生成 POC 高级

未找到公开 POC。

登录以生成 AI POC

三、漏洞 CVE-2026-84373 的情报信息

登录查看更多情报信息。

CVE-2026-84373 其他参考 (8)

IV. Related Vulnerabilities

V. Comments for CVE-2026-84373

暂无评论


发表评论