---
title: "CX-2022-5003"
date: "2022-04-28T07:00:00+00:00"
url: "https://checkmarx.com/zero/vulnerabilities/cx-2022-5003/"
---

# CX-2022-5003

[Disclosed vulnerabilities](https://checkmarx.com/zero/vulnerabilities/)

CVE-2022-0686  **Published:** Apr 28, 2022

CWE-639 CWE-639 Authorization Bypass Through User-Controlled Key  9.1 Critical Severity authorization bypass javascript node nodejs npm SSRF

@ @r0hansh  Reported by Checkmarx Zero

Details Overview

## Summary

Authorization Bypass through user-controlled key in `url-parse`. When no port number is provided in the “url”, url-parse is unable to find the correct hostname.

## Product

NPM `url-parse` prior to 1.5.8.

## Impact

This issue may lead to SSRF, Open Redirect or any other vulnerability which depends on the hostname field of the parsed url.

## Steps to reproduce

```var
var PAYLOAD = "http://example.com:";

// Expected hostname: example.com
// Actual hostname by url-parse: example.com:
console.log(Url(PAYLOAD));
```

### Expected result:

```{
  slashes: true,
  protocol: 'http:',
  hash: '',
  query: '',
  pathname: '/',
  auth: '',
  host: 'example.com:',
  port: '',
  hostname: 'example.com:',
  password: '',
  username: '',
  origin: 'http://example.com:',
  href: 'http://example.com:/'
}
```

## Remediation

Update url-parse to version 1.5.8.

## Credit

This issue was reported by @r0hansh through huntr.dev.

## Resources

1. [Disclosure](https://huntr.dev/bounties/55fd06cd-9054-4d80-83be-eb5a454be78c/)
2. [d5c6479](https://github.com/unshiftio/url-parse/commit/d5c64791ef496ca5459ae7f2176a31ea53b127e5)

0  Critical Severity CVSS v3.1 Score

   9.1

CVSS v3.1 Vectors- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: High
- Availability Impact: None

Advisory Timeline1. Disclosed Feb 17, 2022

## Explore more findings

[19 Nov 2026 CVE-2026-129292  PHP-FPM status endpoint XSS via unescaped user and script fields   5.3  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-129292/) [19 Nov 2026 CVE-2026-129538  PHP-CGI out-of-bounds read and write during PATH\_INFO correction   6.9  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-129538/) [22 Apr 2026 CVE-2026-42236  Unauthenticated Denial of Service in n8n via MCP Client Registration   8.7  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-4223/) [22 Apr 2026 CVE-2026-42230  n8n has Open Redirect in MCP OAuth Consent Flow   5.1  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-42230/) [27 Feb 2026 CVE-2026-27578  n8n Vulnerable to Stored XSS via Various Nodes   8.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-27578/) [26 Feb 2026 CVE-2026-27950  Use-after-free in FreeRDP SDL2   5.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2026-27950/) [27 Nov 2025 CVE-2025-34281  Stored Cross-Site Scripting (XSS) in ThingsBoard   6.2  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2025-34281/) [17 Jan 2025 CVE-2025-0825  HTTP Response Splitting in cpp-httplib   6.9  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2025-0825/) [17 Jun 2025 CVE-2025-6050  Stored Cross-Site Scripting (XSS) in Mezzanine CMS Admin Interface   4.8  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2025-6050/) [12 Dec 2024 CVE-2024-8374  Code Injection in UltiMaker Cura   7.8  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-8374/) [14 Nov 2024 CVE-2024-52526  Stored Cross-site Scripting in @LibreNMS/LibreNMS Services Tab   7.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-52526/) [14 Nov 2024 CVE-2024-51497  Stored Cross-site Scripting in @LibreNMS/LibreNMS Custom OID Tab   7.5  Visit the page](https://checkmarx.com/zero/vulnerabilities/cve-2024-51497/)
