CVE-2020-26291: Hostname spoofing via backslashes in URL in urijs

urijs Updated 02 Oct 2025

Summary

30/12/2020
Yes i
Moderate
6.5

CVE-2020-26291: Hostname spoofing via backslashes in URL. Affects urijs versions < 1.19.4. Fixed in 1.19.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

urijs is an npm package that provides a JavaScript library for working with URLs. It allows developers to parse, manipulate, and generate URLs. The package is widely used in web development projects to handle URL-related operations. However, versions of urijs prior to 1.19.4 are vulnerable to a hostname spoofing vulnerability when processing URLs containing backslashes followed by an at character. This vulnerability can lead to incorrect security decisions and various potential attacks, such as allow/block list bypasses, SSRF attacks, open redirects, or other undesired behavior.

Vulnerability Detail

The vulnerability arises from the incorrect handling of backslashes followed by an at character in the hostname of a URL. Affected versions of urijs incorrectly return the observed hostname instead of the expected hostname. This can be exploited by an attacker to spoof the hostname and potentially bypass security measures. The impact of this vulnerability depends on how the hostname is used in security decisions. Patched versions of urijs (1.19.4 and later) correctly return the expected hostname, aligning with the behavior specified in the WHATWG URL specification.

How To Fix

Latest published version: 1.19.11 as of 23 Oct 2026

npm install urijs@1.19.11

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.19.4

This is the first release that contains the fix.

npm install urijs@1.19.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to update to the patched version (1.19.4) as soon as possible.

Conclusion

The hostname spoofing vulnerability in urijs versions prior to 1.19.4 can lead to incorrect security decisions and potential attacks. It is crucial to update to the patched version (1.19.4) to mitigate this vulnerability. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for urijs →

Share this vulnerability

FAQ

urijs is an npm package that provides a JavaScript library for working with URLs. It allows developers to parse, manipulate, and generate URLs.

The impact of this vulnerability depends on how the hostname is used in security decisions. It can potentially lead to allow/block list bypasses, SSRF attacks, open redirects, or other undesired behavior.

Versions of urijs prior to 1.19.4 are affected by this vulnerability.

To fix this vulnerability, update the urijs package to version 1.19.4 or later.

There is no known workaround for this vulnerability. It is recommended to update to the patched version (1.19.4) as soon as possible.

Related vulnerabilities

Recent vulnerabilities recorded for urijs.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 1.19.11 as of 23 Oct 2026

npm install urijs@1.19.11

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.19.4

This is the first release that contains the fix.

npm install urijs@1.19.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback