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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| nodejs | undici | <= 5.8.1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | node-undici | 5.8.2+dfsg1+~cs18.9.18.1-1 | — |
| Debian 13 | node-undici | 5.8.2+dfsg1+~cs18.9.18.1-1 | — |
| Debian 12 | node-undici | 5.8.2+dfsg1+~cs18.9.18.1-1 | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP4 | nodejs16 | 16.17.0-150400.3.6.1 | SUSE-SU-2022:3250-1 |
| SLES 15 SP3 | nodejs16 | 16.17.0-150300.7.9.1 | SUSE-SU-2022:3251-1 |
| SLES 12 | nodejs16 | 16.17.0-8.9.1 | SUSE-SU-2022:3196-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | nodejs16 | 16.17.0-2.1 | openSUSE-SU-2024:12285-1 |
| openSUSE Leap 15.4 | nodejs16 | 16.17.0-150400.3.6.1 | SUSE-SU-2022:3250-1 |
| openSUSE Leap 15.3 | nodejs16 | 16.17.0-150300.7.9.1 | SUSE-SU-2022:3251-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | undici | < 5.8.2 | 5.8.2 | GHSA-8qr4-xgw6-wmr3 |
Advisories 5
- SUSE-SU-2022:3196-1 Security update for nodejs16 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:3251-1 Security update for nodejs16 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:3250-1 Security update for nodejs16 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:12285-1 corepack16-16.17.0-2.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- WID-SEC-2022-1933 Red Hat Satellite und Red Hat Enterprise Linux: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jun 18, 2023