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
- Vega Cross-Site Scripting (XSS) via event filter when not using CSP mode expressionInterpeter - CVE-2025-26619
- @hono/node-server has Denial of Service risk when receiving Host header that cannot be parsed - CVE-2024-32652
- jose vulnerable to resource exhaustion via specifically crafted JWE with compressed plaintext - CVE-2024-28176
- Authorization Bypass Through User-Controlled Key in url-parse - CVE-2022-0686
- Tags:
- npm
- url-parse
Anything's wrong? Let us know Last updated on September 11, 2023