`undici.request` vulnerable to SSRF using absolute URL on `pathname`
- Severity:
- Medium
Description
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
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.
Recommendation
Update the undici package to the latest compatible version. Followings are version details:
- Affected version(s): <= 5.8.1
- Patched version(s): 5.8.2
References
Related Issues
- Undici's cookie header not cleared on cross-origin redirect in fetch - CVE-2023-45143
- undici before v5.8.0 vulnerable to CRLF injection in request headers - CVE-2022-31150
- Follow Redirects improperly handles URLs in the url.parse() function - CVE-2023-26159
- Exposure of Sensitive Information to an Unauthorized Actor in nanoid - CVE-2021-23566
- Tags:
- npm
- undici
Anything's wrong? Let us know Last updated on February 03, 2023