CVE-2022-0686:
Authorization Bypass Through User-Controlled Key in url-parse
9.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.34034%
CWE
Published
2/21/2022
Updated
11/29/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
url-parse | npm | < 1.5.8 | 1.5.8 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key changes in the patch: 1) The port regex modification from \d+ to \d* shows empty ports weren't properly detected, allowing URLs like 'http://example.com:' to be parsed with incorrect host values. 2) The toString() function's host handling changes demonstrate it was stripping trailing colons needed for proper host identification. These combined allowed user-controlled keys to bypass authorization checks through crafted URLs with empty ports.