CVE-2021-3664: Open redirect in url-parse
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.55638%
CWE
Published
8/10/2021
Updated
2/23/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
url-parse | npm | < 1.5.2 | 1.5.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how extractProtocol
processed URLs with non-standard slash patterns after the protocol. The fix introduced the isSpecial
helper and modified extractProtocol
to explicitly handle special protocols, ignoring excess slashes. Pre-patch versions failed to properly separate the hostname from the path in these cases, enabling open redirects. The commit diff shows critical logic changes in extractProtocol
, and the CVE/issue descriptions confirm this was the attack vector.