CVE-2022-2217: Cross-Site Scripting in parse-url
Summary
CVE-2022-2217: Cross site scripting 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. However, versions prior to 6.0.1 of the parse-url package are vulnerable to a Cross-Site Scripting (XSS) attack.
Vulnerability Detail
The vulnerability in parse-url allows an attacker to inject malicious scripts into web pages viewed by users. This can lead to various security risks, such as stealing sensitive information, session hijacking, or performing unauthorized actions on behalf of the user. The vulnerability is classified as MODERATE severity with a CVSS score of 6.1.
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
In conclusion, the parse-url package prior to version 6.0.1 is vulnerable to Cross-Site Scripting (XSS) attacks. It is crucial to update the package to the fixed version to mitigate the risk of unauthorized script execution on web pages. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for parse-url →
FAQ
The vulnerability allows an attacker to execute arbitrary scripts on web pages viewed by users, potentially leading to unauthorized actions or data theft.
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 and the tool will provide real-time alerts for open-source vulnerabilities.
Currently, there is no known workaround for this vulnerability. It is recommended to update the parse-url package to the fixed version.
There are no known public exploits for this vulnerability at the moment. However, it is important to update the package to mitigate the risk.
You can find more information about this vulnerability in the GitHub Advisory Database at https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-q6wq-5p59-983w/GHSA-q6wq-5p59-983w.json
References
Related vulnerabilities
Recent vulnerabilities recorded for parse-url.