Skip to main content
Public proof of conceptFix available

CVE-2022-35949

A public proof of concept exists; no exploitation attested.

  • Published2022-08-12
  • Fixed in5.8.2
  • WeaknessCWE-918

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2022-08-1223:15CVE publishedNVD

Versions per branch

OSV · NVD
undici
BranchAffectedFixed in
5.8< 5.8.25.8.2
Nodejs undici
BranchAffectedFixed in
5.8≤ 5.8.1no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • nodejs undici
    Affected
    • = <= 5.8.1no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2023-01-18

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • node-undiciDebian:14all versions · fixed in 5.8.2+dfsg1+~cs18.9.18.1-1
  • node-undiciDebian:13all versions · fixed in 5.8.2+dfsg1+~cs18.9.18.1-1
  • node-undiciDebian:12all versions · fixed in 5.8.2+dfsg1+~cs18.9.18.1-1
  • nodejs16SUSE:Linux Enterprise Module for Web and Scripting 15 SP4all versions · fixed in 16.17.0-150400.3.6.1
  • nodejs16SUSE:Linux Enterprise Module for Web and Scripting 15 SP3all versions · fixed in 16.17.0-150300.7.9.1
  • nodejs16SUSE:Linux Enterprise Module for Web and Scripting 12all versions · fixed in 16.17.0-8.9.1
  • nodejs16openSUSE:Tumbleweedall versions · fixed in 16.17.0-2.1
  • nodejs16openSUSE:Leap 15.4all versions · fixed in 16.17.0-150400.3.6.1

2 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-35949 Red Hat Product Security2 known affected

    nodejs: undici.request vulnerable to SSRF

    rhacm2/search-ui-rhel8 as a component of Red Hat Advanced Cluster Management for Kubernetes 2 · devspaces/dashboard-rhel8 as a component of Red Hat OpenShift Dev Spaces

  • RHSA-2022:7276 Red Hat Product Security221 products fixed

    Red Hat Security Advisory: Red Hat Advanced Cluster Management 2.4.8 security fixes and container updates

Full record on NVD

Fix

  1. Update undici to 5.8.2
  2. Vendor fix Red Hat Product Security RHSA-2022:7276 · 221 productsFor Red Hat Advanced Cluster Management for Kubernetes, see the following documentation, which will be updated shortly for this release, for important instructions on installing this update: https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.4/html-s…
  3. Workaround from the vendor Red Hat Product Security RHSA-2022:7276 · 221 productsValidate user input before passing it to the `undici.request` call.
  4. No fix available, says the vendor Red Hat Product Security CVE-2022-35949 · 2 productsAffected

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2025-04-22
  • CNACVSS 3.15.3known since 2026-10-23
  • NVDCVSS 3.19.8read 2026-10-23
  • CNAweakness (CWE)CWE-918known since 2026-10-23
  • FIRST EPSSEPSS score1.9 %2026-11-08
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryMODERATE2022-08-18

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2022-08-12
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-8qr4-xgw6-wmr3

Frequently asked questions

What is CVE-2022-35949?

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.

Is CVE-2022-35949 actively exploited?

A proof-of-concept exploit exists for CVE-2022-35949, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2022-35949?

CVE-2022-35949 has a CVSS v3 base score of 9.8 (CRITICAL severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running undici? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record