CVE intelligence and bounded remediation

CVE-2022-35949 — Nodejs Undici security vulnerability

Critical CVSS 9.8

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
Critical
CVSS
9.8 (3.1)
Published
2022-08-12
CISA KEV
Not currently listed
Ecosystem
javascript/npm
Weaknesses
CWE-918

Affected products

  • nodejs / undici

Matched remediation archetype

Server-side request forgery and unintended proxying

This catalog composition supplies bounded fallback guidance. Explicitly reviewed curated workflows load with the complete record below.

Check exposure

  • Inventory server-side URL fetchers, webhooks, importers, previews, redirects, proxies, and protocol handlers reachable from untrusted input.
  • Map egress paths to internal services, metadata endpoints, loopback, private address space, and privileged control planes.
  • Review DNS resolution, redirect, proxy, credential-forwarding, and URL parsing behavior without requesting sensitive targets.

Remediate safely

  • Replace arbitrary destinations with named integrations or a strict allowlist of schemes, hosts, ports, and paths.
  • Resolve and validate every destination and redirect hop, then enforce egress policy independently of application checks.
  • Remove ambient credentials and sensitive headers from fetchers; apply response size, time, and content limits.

Authoritative sources

Complete CVE record and remediation plan

The detailed catalog view below loads this exact record, its source evidence, and the full seven-phase agentic change plan.