【高危】@zenalexa/unicli 安全更新(GHSA-v3f4-w7r7-v3hm)
安全情报快照 · 风险级别:高危 · GHSA-v3f4-w7r7-v3hm
先看结论
@zenalexa/unicli存在安全风险,< 0.225.2 受影响,建议升级至 0.225.2。
影响范围
| 生态 | 组件 | 受影响版本 | 首个修复版本 |
|---|---|---|---|
| npm | @zenalexa/unicli |
< 0.225.2 | 0.225.2 |
处置建议
优先将 @zenalexa/unicli 升级至 0.225.2 或更高版本;升级前请结合业务依赖完成兼容性验证。
上游技术详情(原文)
Impact
Uni-CLI versions before 0.225.2 exposed the legacy JSON-RPC-over-HTTP MCP transport on loopback without validating browser Origin headers before routing requests. A malicious web page could send a CORS simple POST request, such as text/plain, to the local /mcp endpoint and deliver a JSON-RPC body to the dispatcher. If the user had started the local MCP HTTP transport, that page could drive tools/call requests against the user's local Uni-CLI server.
The Streamable HTTP transport already enforced this browser-to-localhost boundary. The legacy stateless HTTP path did not, so the two HTTP transports had drifted. This issue is about the browser-to-localhost boundary; it does not change Uni-CLI's local-code-execution trust model.
Patches
Version 0.225.2 fixes the issue by moving the Origin policy into a shared guard and applying it before routing in both HTTP transports. Non-loopback browser Origins are rejected with HTTP 403 before health, OAuth, or /mcp dispatch runs. Non-browser clients that omit Origin remain supported.
Workarounds
Upgrade to 0.225.2 or later. If upgrading is not immediately possible, do not expose the legacy HTTP MCP transport to browser-originated traffic; use the default stdio transport or the Streamable HTTP transport instead.
Credits
Reported privately by Ryan Vonbrubeck (@dodge1218).
来源与许可
- GitHub Advisory GHSA-v3f4-w7r7-v3hm
- https://github.com/olo-dot-io/Uni-CLI/security/advisories/GHSA-v3f4-w7r7-v3hm
本页自动同步 GitHub Advisory Database 的公开数据,并保留上游原文供核验;不宣称原创分析。数据许可:CC-BY-4.0。
评论
登录 后参与讨论。
还没有评论,来说两句。