# CVE-2022-35949: `undici.request` vulnerable to SSRF using absolute URL on `pathname`

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.93%, higher than 80% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-08-12T00:00:00.000Z
- Modified: 2026-06-17T04:52:35.147Z
- Also known as: GHSA-8qr4-xgw6-wmr3
- Weaknesses: CWE-918
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- nodejs undici: <= 5.8.1; up to 5.8.1
- undici (npm): before 5.8.2

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/nodejs/undici/security/advisories/GHSA-8qr4-xgw6-wmr3> (exploit, mitigation, third-party-advisory, web)
- <https://github.com/nodejs/undici/commit/124f7ebf705366b2e1844dff721928d270f87895> (patch, third-party-advisory, web)
- <https://github.com/nodejs/undici/releases/tag/v5.8.2> (release-notes, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-35949> (advisory)
- <https://github.com/nodejs/undici> (package)

## Sources

- CVE List: [CVE-2022-35949](https://www.cve.org/CVERecord?id=CVE-2022-35949), CVE Terms of Use, modified 2025-04-22
- GitHub Advisory Database: [GHSA-8qr4-xgw6-wmr3](https://github.com/advisories/GHSA-8qr4-xgw6-wmr3), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2022-35949](https://nvd.nist.gov/vuln/detail/CVE-2022-35949), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-35949 · Whole record: https://cve.day/CVE-2022-35949.json · Rebuilt by cve.day 2026-11-25T22:58:14.184Z
