Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2022-35949

nodejs: undici.request vulnerable to SSRF

Overview

Published
12 Aug 2022
Modified
17 Jun 2026
Critical CVE
3 Registry packages
7 OS packages
5 Linux distributions
Yes Fix available

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.

Source: OX vulnerability database

Severity

9.8 · CRITICAL

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weakness: CWE-918

Affected packages · 3

Packages affected by CVE-2022-35949
EcosystemPackageVulnerableFixed in
npm undici <5.8.2 5.8.2
Seal npm @seal-security/undici >=4.16.0-sp1, <4.16.0-sp999 4.16.0-sp999
Seal npm undici >=4.16.0-sp0, <4.16.0-sp999 4.16.0-sp999

Open a package to see all its vulnerabilities.

Operating systems · 7 fixes

SUSE Linux Enterprise 1 release · 1 package

fixed 1
nodejs16
SUSE Linux Enterprise fixes for CVE-2022-35949
ReleasePackageFixed inAdvisory
15.4 nodejs16 +3 16.17.0-150400.3.6.1 SUSE-SU-2022:3250-1

debian 3 releases · 1 package

fixed 3
node-undici
debian fixes for CVE-2022-35949
ReleasePackageFixed in
12 node-undici 5.8.2+dfsg1+~cs18.9.18.1-1
13 node-undici 5.8.2+dfsg1+~cs18.9.18.1-1
14 node-undici 5.8.2+dfsg1+~cs18.9.18.1-1

echo 1 release · 1 package

fixed 1
node-undici
echo fixes for CVE-2022-35949
ReleasePackageFixed in
node-undici 5.8.2+dfsg1+~cs18.9.18.1-1

openSUSE 1 release · 1 package

fixed 1
corepack16
openSUSE fixes for CVE-2022-35949
ReleasePackageFixed inAdvisory
Tumbleweed corepack16 +4 16.17.0-2.1 openSUSE-SU-2024:12285-1

root.io debian 1 release · 1 package

fixed 1
rootio-node-undici
root.io debian fixes for CVE-2022-35949
ReleasePackageFixed in
12 rootio-node-undici 5.8.2+dfsg1+~cs18.9.18.1-1

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.