url-parse incorrectly parses hostname / protocol due to unstripped leading control characters.
- Severity:
- Medium
Description
Leading control characters in a URL are not stripped when passed into url-parse. This can cause input URLs to be mistakenly be interpreted as a relative URL without a hostname and protocol, while the WHATWG URL parser will trim control characters and treat it as an absolute URL.
Recommendation
Update the url-parse package to the latest compatible version. Followings are version details:
- Affected version(s): < 1.5.9
- Patched version(s): 1.5.9
References
- GHSA-jf5r-8hm2-f872
- huntr.dev
- security.netapp.com
- lists.debian.org
- CVE-2022-0691
- CWE-639
- CAPEC-310
- OWASP 2021-A1
- OWASP 2021-A6
Related Issues
- url-parse Incorrectly parses URLs that include an '@ - CVE-2022-0639
- Authorization Bypass Through User-Controlled Key in url-parse - CVE-2022-0686
- Authorization bypass in url-parse - CVE-2022-0512
- Open redirect in url-parse (GHSA-hh27-ffr2-f2jc) - CVE-2021-3664
- Tags:
- npm
- url-parse
Anything's wrong? Let us know Last updated on September 11, 2023