CVE-2022-35949: `undici.request` vulnerable to SSRF using absolute URL on `pathname`
Vulnerability summary
CVE-2022-35949 is a critical (CVSS 9.8) Server-Side Request Forgery vulnerability in nodejs undici. EPSS estimates a 1.93% chance of exploitation in the next 30 days, higher than 79.9% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 4 · Related 4Timeline
- 12-08-2022PublishedVulnerability first disclosed.
- 22-04-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 4 sources · 1 version- CVE.orgCNA5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NDiffers
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · NpmEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NDiffers
EPSS trend
Probability
1.93%
Chance of exploitation in the next 30 days
Percentile
80%
Versus all other CVEs
30-day change
Increase +0.17 pp
From 1.75% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundUndici
Maturity: poc
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Debian1 product
- node-undici< 5.8.2+dfsg1+~cs18.9.18.1-1
Nodejs1 product
- undici≤ 5.8.1
Npm1 product
- undici< 5.8.2
3 vendors · 3 products
References
6 links- github.com/nodejs/undici/security/advisories/GHSA-8qr4-xgw6-wmr3WEBExploitMitigationThird Party Advisory
- github.com/nodejs/undici/commit/124f7ebf705366b2e1844dff721928d270f87895WEBPatchThird Party Advisory
- github.com/nodejs/undiciPACKAGE