CVE-2022-35949
Published on: Not Yet Published
Last Modified on: 03/28/2023 05:10:00 PM UTC
Certain versions of Undici from Nodejs contain the following vulnerability:
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.
- CVE-2022-35949 has been assigned by
security-adviso[email protected] to track the vulnerability - currently rated as CRITICAL severity.
- Affected Vendor/Software:
nodejs - undici version <= 5.8.1
CVSS3 Score: 9.8 - CRITICAL
Attack Vector ⓘ |
Attack Complexity |
Privileges Required |
User Interaction |
---|---|---|---|
NETWORK | LOW | NONE | NONE |
Scope | Confidentiality Impact |
Integrity Impact |
Availability Impact |
UNCHANGED | HIGH | HIGH | HIGH |
CVE References
Description | Tags ⓘ | Link |
---|---|---|
`undici.request` vulnerable to SSRF using absolute URL on `pathname` · Advisory · nodejs/undici · GitHub | github.com text/html |
![]() |
Merge pull request from GHSA-8qr4-xgw6-wmr3 · nodejs/undici@124f7eb · GitHub | github.com text/html |
![]() |
Release v5.8.2 · nodejs/undici · GitHub | github.com text/html |
![]() |
Related QID Numbers
Exploit/POC from Github
undici is an HTTP/1.1 client, written from scratch for Node.js.`undici` is vulnerable to SSRF (Server-side Request Fo…
Known Affected Configurations (CPE V2.3)
Type | Vendor | Product | Version | Update | Edition | Language |
---|---|---|---|---|---|---|
Application | Nodejs | Undici | All | All | All | All |
- cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:*:
Social Mentions
Source | Title | Posted (UTC) |
---|---|---|
![]() |
CVE-2022-35949 is about a possible SSRF if an absolute pathname is inserted in undici.request() github.com/nodejs/undici/… | 2022-08-09 09:45:28 |
![]() |
CVE-2022-35949 : undici is an HTTP/1.1 client, written from scratch for Node.js.`undici` is vulnerable to #SSRF Se… twitter.com/i/web/status/1… | 2022-08-12 22:48:14 |
![]() |
Nodejs - CVE-2022-35949: github.com/nodejs/undici/… | 2022-08-13 01:01:14 |
![]() |
CVE-2022-35949 | 2022-08-12 23:38:50 |