# CVE-2022-2217: parse-url cross-site scripting vulnerability

Source: https://junglewise.ai/threats/cve-2022-2217-parse-url-cross-site-scripting-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-06-28. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2022-2217 · Severity: low · CVSS 3.1 · Published 2022-06-28

parse-url is a JavaScript library used to parse and normalize URLs. A cross-site scripting (XSS) vulnerability in versions prior to 6.0.1 allows attackers to inject malicious scripts through specially crafted URLs, potentially affecting applications that use this library to process untrusted URL input. This could lead to account hijacking, data theft, or malware distribution to users.

Technologies: [parse-url (npm)](https://junglewise.ai/threats/technologies/parse-url). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2022-2217 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2022-2217 being exploited in the wild.

**How severe is CVE-2022-2217?** Low severity, with a CVSS score of 3.1, published 28 June 2022.

**Which products and versions are affected?** parse-url (npm) SEMVER:introduced=0,fixed=6.0.1.

**Is there a fix for CVE-2022-2217?** Yes. parse-url (npm): upgrade to 6.0.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2022-2217 attacked?** It is attacked over the network.

**Am I affected by CVE-2022-2217?** Check whether you run parse-url (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- parse-url (npm): upgrade to 6.0.1 or later

  ```sh
  npm install parse-url@6.0.1
  ```


## Technical details

The vulnerability is a stored/reflected Cross-Site Scripting (CWE-79) flaw in the parse-url library prior to version 6.0.1. The library fails to properly sanitize or escape URL components when parsing input, allowing an attacker to inject arbitrary HTML and JavaScript code. The vulnerability requires user interaction (visiting a malicious link or rendering untrusted URL data in a web context) but has a network attack vector with low complexity. An attacker can execute arbitrary JavaScript in the context of an affected application, compromising user sessions and data. The fix was released in version 6.0.1 (patched on 2022-06-27).

## Affected products

- ionicabizau parse-url prior to 6.0.1

## Identifiers

- CVE-2022-2217
- GHSA-q6wq-5p59-983w

## Timeline

- 2022-06-28: disclosed: Vulnerability published
- 2022-06-27: patched: Fixed in version 6.0.1

## References

- [https://github.com/ionicabizau/parse-url/commit/21c72ab9412228eea753e2abc48f8962707b1fe3](https://github.com/ionicabizau/parse-url/commit/21c72ab9412228eea753e2abc48f8962707b1fe3)

## Related threats

- [parse-url hostname spoofing via incorrect URL parsing](https://junglewise.ai/threats/cve-2022-3224-parse-url-hostname-spoofing-via-incorrect-url-parsing)
- [ionicabizau parse-url server-side request forgery](https://junglewise.ai/threats/cve-2022-2900-ionicabizau-parse-url-server-side-request-forgery)
- [parse-url Server-Side Request Forgery](https://junglewise.ai/threats/cve-2022-2216-parse-url-server-side-request-forgery)
- [parse-url hostname confusion information disclosure](https://junglewise.ai/threats/cve-2022-0722-parse-url-hostname-confusion-information-disclosure)
- [parse-url cross-site scripting](https://junglewise.ai/threats/cve-2022-2218-parse-url-cross-site-scripting)
