CVE-2022-35949

Published on: Not Yet Published

Last Modified on: 03/28/2023 05:10:00 PM UTC

CVE-2022-35949 - advisory for GHSA-8qr4-xgw6-wmr3

Source: Mitre Source: NIST CVE.ORG Print: PDF PDF
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

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 URL Logo security-adviso[email protected] to track the vulnerability - currently rated as CRITICAL severity.
  • Affected Vendor/Software: URL Logo 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
URL Logo CONFIRM github.com/nodejs/undici/security/advisories/GHSA-8qr4-xgw6-wmr3
Merge pull request from GHSA-8qr4-xgw6-wmr3 · nodejs/undici@124f7eb · GitHub github.com
text/html
URL Logo MISC github.com/nodejs/undici/commit/124f7ebf705366b2e1844dff721928d270f87895
Release v5.8.2 · nodejs/undici · GitHub github.com
text/html
URL Logo MISC github.com/nodejs/undici/releases/tag/v5.8.2

Related QID Numbers

  • 182859 Debian Security Update for node-undici (CVE-2022-35949)
  • 753302 SUSE Enterprise Linux Security Update for nodejs16 (SUSE-SU-2022:3251-1)
  • 753318 SUSE Enterprise Linux Security Update for nodejs16 (SUSE-SU-2022:3250-1)

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
ApplicationNodejsUndiciAllAllAllAll
  • cpe:2.3:a:nodejs:undici:*:*:*:*:*:node.js:*:*:

Social Mentions

Source Title Posted (UTC)
Twitter Icon @matteocollina 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
Twitter Icon @CVEreport 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
Twitter Icon @LinInfoSec Nodejs - CVE-2022-35949: github.com/nodejs/undici/… 2022-08-13 01:01:14
Reddit Logo Icon /r/netcve CVE-2022-35949 2022-08-12 23:38:50
© CVE.report 2023 Twitter Nitter Twitter Viewer |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

CVE.report and Source URL Uptime Status status.cve.report