CVE-2022-35949 json
`undici.request` vulnerable to SSRF using absolute URL on `pathname`
published 2022-08-12 4 y ago modified 2026-06-17 4 mo ago also GHSA-8qr4-xgw6-wmr3 , EUVD-2022-6518
- cvss
- 5.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.9%
- EPSS 1.9% chance of exploitation in 30 days, percentile 80%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm undici 5.8.2
- node-undici Debian 14, Debian 13, Debian 12 5.8.2+dfsg1+~cs18.9.18.1-1
debian advisories DEBIAN-CVE-2022-35949
- nodejs16 SLE Module for Web and Scripting 15 SP3, openSUSE Leap 15.3 16.17.0-150300.7.9.1
- nodejs16 SLE Module for Web and Scripting 15 SP4, openSUSE Leap 15.4 16.17.0-150400.3.6.1
- nodejs16 SLE Module for Web and Scripting 12 16.17.0-8.9.1
suse advisories SUSE-SU-2022:3251-1SUSE-SU-2022:3250-1SUSE-SU-2022:3196-1
- nodejs16 openSUSE Tumbleweed 16.17.0-2.1
opensuse advisories openSUSE-SU-2024:12285-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-35949 updated cvss 5.3
nodejs: undici.request vulnerable to SSRF
-
Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/search-ui-rhel8 Red Hat OpenShift Dev Spaces devspaces/dashboard-rhel8affected: workaround, no fix available “Validate user input before passing it to the `undici.request` call.”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
1.93% chance of exploitation in the next 30 days, higher than 80% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/nodejs/undici/security/advisories/GHSA-8qr4-xgw6-wmr3 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | undici | <5.8.2 |
5.8.2 |
Affected products
- nodejs undici
Classification
- Weakness
-
- CWE-918 Server-Side Request Forgery
References
-
github.com
/nodejs/undici/commit/124f7ebf705366b2e1844dff721928d270f87895
web, patch, third-party-advisory
-
github.com
/nodejs/undici/security/advisories/GHSA-8qr4-xgw6-wmr3
web, exploit, mitigation, third-party-advisory
-
github.com
/nodejs/undici/releases/tag/v5.8.2
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-35949
advisory
-
github.com
/nodejs/undici
package
Sources
- CVE List CVE-2022-35949
- GitHub Advisory GHSA-8qr4-xgw6-wmr3
- NVD CVE-2022-35949
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.