CVE-2022-2900: Server-Side Request Forgery (SSRF) in GitHub repository ionicabizau/parse-url
9.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.69669%
CWE
Published
9/15/2022
Updated
6/21/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 |
|---|---|---|---|
| parse-url | npm | < 8.1.0 | 8.1.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The core vulnerability exists in the parseUrl function's handling of URLs. Before the patch:
- No input length validation allowed excessively long URLs that could bypass checks
- The 'file' protocol check and subsequent Git SSH regex matching created a path for internal resource access
- Lack of proper error handling for failed parses (now indicated by parsed.parse_failed) let invalid URLs proceed
- Missing throw mechanism for non-Git URLs in the 'file' protocol path enabled SSRF
The patch added length checks, parse_failed tracking, and strict error throwing - all indicators these were the missing security controls in the original function.