9.8

CVE-2022-35949: `undici.request` vulnerable to SSRF using absolute URL on `pathname`

Modified
AliasesDEBIAN-CVE-2022-35949GHSA-8qr4-xgw6-wmr3
Published 12-08-2022Last modified 22-04-2025

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.

Priority
Routine

Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
9.8/10
010
Critical · v3.1 (NVD)
EPSS score
1.93%
0%100%
Low · +0.17 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 4 · Related 4

Timeline

  1. 12-08-2022
    PublishedVulnerability first disclosed.
  2. 22-04-2025
    Last 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

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

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Undici

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

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
Npm1 product
  • undici< 5.8.2

3 vendors · 3 products

References

6 links