中危 nodejs undici 服务端请求伪造(ssrf)
CVE编号
CVE-2022-35949利用情况
暂无补丁情况
官方补丁披露时间
2022-08-13漏洞描述
undici is an HTTP/1.1 client, written from scratch for Node.js.`undici` is vulnerable to SSRF (Server-side Request Forgery) when an application takes in **user input** into the `path/pathname` option of `undici.request`. If a user specifies a URL such as `http://127.0.0.1` or `//127.0.0.1` ```js const undici = require("undici") undici.request({origin: "http://example.com", pathname: "//127.0.0.1"}) ``` Instead of processing the request as `http://example.org//127.0.0.1` (or `http://example.org/http://127.0.0.1` when `http://127.0.0.1 is used`), it actually processes the request as `http://127.0.0.1/` and sends it to `http://127.0.0.1`. If a developer passes in user input into `path` parameter of `undici.request`, it can result in an _SSRF_ as they will assume that the hostname cannot change, when in actual fact it can change because the specified path parameter is combined with the base URL. This issue was fixed in `[email protected]`. The best workaround is to validate user input before passing it to the `undici.request` call.解决建议
建议您更新当前系统或软件至最新版,完成漏洞的修复。受影响软件情况
# | 类型 | 厂商 | 产品 | 版本 | 影响面 | ||||
1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
运行在以下环境 | |||||||||
应用 | nodejs | undici | * | Up to (including) 5.8.1 | |||||
运行在以下环境 | |||||||||
系统 | debian_12 | node-undici | * | Up to (excluding) 5.8.2+dfsg1+~cs18.9.18.1-1 | |||||
运行在以下环境 | |||||||||
系统 | debian_sid | node-undici | * | Up to (excluding) 5.8.2+dfsg1+~cs18.9.18.1-1 | |||||
运行在以下环境 | |||||||||
系统 | opensuse_Leap_15.3 | nodejs16-docs | * | Up to (excluding) 16.17.0-150300.7.9.1 | |||||
运行在以下环境 | |||||||||
系统 | opensuse_Leap_15.4 | nodejs16-docs | * | Up to (excluding) 16.17.0-150400.3.6.1 | |||||
- 攻击路径 远程
- 攻击复杂度 容易
- 权限要求 无需权限
- 影响范围 全局影响
- EXP成熟度 未验证
- 补丁情况 官方补丁
- 数据保密性 无影响
- 数据完整性 无影响
- 服务器危害 无影响
- 全网数量 N/A
CWE-ID | 漏洞类型 |
CWE-918 | 服务端请求伪造(SSRF) |
Exp相关链接

版权声明
本站原创文章转载请注明文章出处及链接,谢谢合作!
评论