CVE-2022-35949
CVSS V2 None
CVSS V3 Critical 9.8
Description
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 `undici@5.8.1`. The best workaround is to validate user input before passing it to the `undici.request` call.
Overview
- CVE ID
- CVE-2022-35949
- Assigner
- security-advisories@github.com
- Vulnerability Status
- Analyzed
- Published Version
- 2022-08-12T23:15:07
- Last Modified Date
- 2023-03-28T17:10:18
Weakness Enumerations
CPE Configuration (Product)
CPE | Vulnerable | Operator | Version Start | Version End |
---|---|---|---|---|
cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:* | 1 | OR | 5.8.1 |
CVSS Version 3
- Version
- 3.1
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector
- NETWORK
- Attack Compatibility
- LOW
- Privileges Required
- NONE
- User Interaction
- NONE
- Scope
- UNCHANGED
- Confidentiality Impact
- HIGH
- Availability Impact
- HIGH
- Base Score
- 9.8
- Base Severity
- CRITICAL
- Exploitability Score
- 3.9
- Impact Score
- 5.9
Sources
Source Name | Source URL |
---|---|
NIST | https://nvd.nist.gov/vuln/detail/CVE-2022-35949 |
MITRE | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-35949 |
History
Created | Old Value | New Value | Data Type | Notes |
---|---|---|---|---|
2022-08-13 00:00:28 | Added to TrackCVE | |||
2023-01-18 23:13:45 | 2023-01-18T22:15:10 | CVE Modified Date | updated | |
2023-01-18 23:13:45 | Analyzed | Modified | Vulnerability Status | updated |
2023-01-19 19:12:25 | Modified | Undergoing Analysis | Vulnerability Status | updated |
2023-03-28 18:13:02 | 2023-03-28T17:10:18 | CVE Modified Date | updated | |
2023-03-28 18:13:02 | Undergoing Analysis | Analyzed | Vulnerability Status | updated |