Skip to content
Heist/ feed
Back to feed
CriticalFix available

node-undici — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-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.

Products
node-undici
Affected versions
Not specified
Fixed versions
5.8.2+dfsg1+~cs18.9.18.1-1
CVEs
CVE-2022-35949
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 15:01 UTC · Revision 1

Source evidence

DEBIAN-CVE-2022-35949

core-osv · Original source

Published 12 Aug 2022, 23:15 UTC

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.

osv:DEBIAN-CVE-2022-35949

node-undici

Fixed versions: 5.8.2+dfsg1+~cs18.9.18.1-1

node-undici

Fixed versions: 5.8.2+dfsg1+~cs18.9.18.1-1

node-undici

Fixed versions: 5.8.2+dfsg1+~cs18.9.18.1-1

Complete source record
{
  "id": "94b678f3aa81a4860320354cdecb513518619f72596c5d81b68773e471042544",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-35949",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2022-35949",
    "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.",
    "evidence": "osv:DEBIAN-CVE-2022-35949",
    "products": [
      {
        "name": {
          "value": "node-undici",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.8.2+dfsg1+~cs18.9.18.1-1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "node-undici",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.8.2+dfsg1+~cs18.9.18.1-1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "node-undici",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.8.2+dfsg1+~cs18.9.18.1-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "DEBIAN-CVE-2022-35949",
      "aliases": [
        "DEBIAN-CVE-2022-35949"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5.8.2+dfsg1+~cs18.9.18.1-1"
                }
              ]
            }
          ],
          "package": {
            "name": "node-undici",
            "purl": "pkg:deb/debian/node-undici?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-35949.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5.8.2+dfsg1+~cs18.9.18.1-1"
                }
              ]
            }
          ],
          "package": {
            "name": "node-undici",
            "purl": "pkg:deb/debian/node-undici?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-35949.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5.8.2+dfsg1+~cs18.9.18.1-1"
                }
              ]
            }
          ],
          "package": {
            "name": "node-undici",
            "purl": "pkg:deb/debian/node-undici?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-35949.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-15T08:02:44.351130924Z",
      "provider": "osv",
      "upstream": [
        "CVE-2022-35949"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2022-35949"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2022-35949",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 324096,
  "published_at": "2022-08-12T23:15:07.97+00:00"
}