Skip to content
Fencer Intel
medium 5.3

CVE-2022-35949 json

`undici.request` vulnerable to SSRF using absolute URL on `pathname`

published 4y ago modified 4mo 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

Is CVE-2022-35949 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

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-rhel8
    affected: 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
last yr.

Exploit prediction

1.93% chance of exploitation in the next 30 days, higher than 80% of all scored CVEs (FIRST EPSS, 2026-11-09).

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

Sources

Fencer Intel 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.