cve.bz

CVE-2022-35949 nodejs undici: SSRF

9.8 criticalExploit referenceEPSS 1.9%Fix available

Critical (9.8) in nodejs undici. EPSS 1.9% estimated probability of exploitation activity in the next 30 days. Fixed in undici 5.8.2.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.9% (unchanged from 1.9% a week ago; 1.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 80th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2025-04-22. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-918 Server-Side Request Forgery (SSRF)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-35949 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-35949?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-35949?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-35949 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
nodejs:undicithrough 5.8.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-8qr4-xgw6-wmr3npmundici<5.8.25.8.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14node-undici5.8.2+dfsg1+~cs18.9.18.1-1DEBIAN-CVE-2022-35949
SUSELinux Enterprise Module for Web and Scripting 12nodejs1616.17.0-8.9.1SUSE-SU-2022:3196-1
SUSELinux Enterprise Module for Web and Scripting 15 SP3nodejs1616.17.0-150300.7.9.1SUSE-SU-2022:3251-1
SUSELinux Enterprise Module for Web and Scripting 15 SP4nodejs1616.17.0-150400.3.6.1SUSE-SU-2022:3250-1
openSUSELeap 15.3nodejs1616.17.0-150300.7.9.1SUSE-SU-2022:3251-1
openSUSELeap 15.4nodejs1616.17.0-150400.3.6.1SUSE-SU-2022:3250-1
openSUSETumbleweednodejs1616.17.0-2.1openSUSE-SU-2024:12285-1

From the distributions' data via OSV.dev: the Debian Security Tracker; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

Validate user input before passing it to the `undici.request` call.

ProductPackageStateAdvisory
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/search-ui-rhel8Affected
Red Hat OpenShift Dev Spacesdevspaces/dashboard-rhel8Affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-35949.

Attack patterns (CAPEC)

  • CAPEC-664 Server Side Request Forgery Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON