Miggo Logo

CVE-2022-2217: Cross site scripting in parse-url

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.55109%
Published
6/28/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
parse-urlnpm< 6.0.16.0.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The XSS vulnerability stems from improper handling of URL parsing in git-ssh formats. The commit 21c72ab introduced a regex (GIT_RE) to better handle these cases, indicating the previous implementation lacked proper validation. The parseUrl function directly processes user-controlled URLs and returns parsed components (pathname, resource, etc.) that could contain untrusted input. When these components are used in web output without proper encoding, XSS occurs. The function's role as the primary URL parser and the security-focused patch targeting its git-ssh handling make it the clear vulnerability source.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*ross-sit* S*riptin* (XSS) - **n*ri* in *it*u* r*pository ioni***iz*u/p*rs*-url prior to *.*.*

Reasoning

T** XSS vuln*r**ility st*ms *rom improp*r **n*lin* o* URL p*rsin* in *it-ss* *orm*ts. T** *ommit ******* intro*u*** * r***x (*IT_R*) to **tt*r **n*l* t**s* **s*s, in*i**tin* t** pr*vious impl*m*nt*tion l**k** prop*r v*li**tion. T** p*rs*Url *un*tion