CVE-2022-0722: Hostname confusion in parse-url
Summary
CVE-2022-0722: Hostname confusion in parse-url. Affects parse-url versions < 6.0.1. Fixed in 6.0.1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The parse-url package is an npm package that provides functionality for parsing and manipulating URLs. It is commonly used in web development projects to handle URL-related operations. The vulnerability identified as CVE-2022-0722 affects versions of the parse-url package prior to 6.0.1. This vulnerability allows for hostname confusion, which can result in the exposure of sensitive information to unauthorized actors. The vulnerability has a severity rating of HIGH with a CVSS score of 7.5.
Vulnerability Detail
The vulnerability arises from hostname confusion in the parse-url package. This confusion can be exploited by an attacker to gain unauthorized access to sensitive information. By manipulating the hostname, an attacker can trick the application into sending sensitive data to a malicious server. This could lead to the exposure of user credentials, personal information, or other confidential data. The vulnerability has been identified as CWE-200, which is the Common Weakness Enumeration identifier for Information Exposure.
How To Fix
Latest published version: 11.1.0 as of 22 Oct 2026
npm install parse-url@11.1.0
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
6.0.1
This is the first release that contains the fix.
npm install parse-url@6.0.1
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Conclusion
The CVE-2022-0722 vulnerability in the parse-url package exposes sensitive information to unauthorized actors through hostname confusion. It is crucial for developers to update the package to version 6.0.1 or later to mitigate the risk. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for parse-url →
FAQ
The vulnerability allows unauthorized actors to access sensitive information, potentially leading to data breaches and privacy violations.
You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file to the playground, and it will alert you if the parse-url package is vulnerable.
At the time of this report, there are no known public exploits for this vulnerability. However, it is important to update the package as soon as possible to mitigate the risk.
No specific workaround has been provided for this vulnerability. It is recommended to update the parse-url package to the fixed version.
This vulnerability was discovered and reported by the GitHub Security Lab.
References
Related vulnerabilities
Recent vulnerabilities recorded for parse-url.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.