---
title: "CX-2021-4305"
date: "2021-02-13T07:00:00+00:00"
url: "https://checkmarx.com/zero/vulnerabilities/cx-2021-4305/"
---

# CX-2021-4305

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

Fixed: Feb 13, 2021

CVE-2021-27516  **Published:** Feb 13, 2021

7.5 High Severity Improper validation javascript npm spoofing

YN Yaniv Nizry  Reported by Checkmarx Zero

Details Overview

## Summary

Affected versions of urijs fails to validate the hostname correctly when using backslash in the protocol e.g. `http:/`.  
Browsers accept backslashes after the protocol, and treat it as a normal slash, while urijs sees it as a relative path.

## Product

urijs before 1.19.6.

## Impact

Depending on library usage and attacker intent, impacts may include allow/block list bypasses, SSRF attacks, open redirects, or other undesired behavior.

## Steps to reproduce

```
var URI = require('urijs');
URI('http:/www.google.com');
```

### Expected result:

the url would be relative without a hostname:

```
URI {
  _string: '',
  _parts: {
    protocol: 'http',
    username: null,
    password: null,
    hostname: null,
    urn: true,
    port: null,
    path: '/www.google.com',
    query: null,
    fragment: null,
    preventInvalidHostname: false,
    duplicateQueryParameters: false,
    escapeQuerySpace: true
  },
  _deferred_build: true
}
```

## Remediation

Update urijs dependency to 1.19.6 or above.

## Credit

This issue was discovered and reported by Checkmarx SCA Security Researcher [Yaniv Nizry](https://www.twitter.com/ynizry).

## Resources

1. [a1ad8bc](https://github.com/medialize/URI.js/commit/a1ad8bcbc39a4d136d7e252e76e957f3ece70839)
2. [Release note](https://github.com/medialize/URI.js/releases/tag/v1.19.6)
3. [Advisory](https://github.com/medialize/URI.js/security/advisories/GHSA-p6j9-7xhc-rhwp)

0  High Severity CVSS v3.1 Score

   7.5

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

Advisory Timeline1. Disclosed Feb 10, 2021 Notified the maintainer
2. Fixed Feb 13, 2021 Fixed version 1.19.6 was released

## 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/)
