Vulnerability in node-url-parse package - Authorization Bypass and Redirection to Untrusted Sites

node-url-parse Updated 02 Oct 2025

Summary

23/02/2023
N/A
Yes i
Unrated
Not published

DLA-3336-1: node-url-parse - security update. Affects node-url-parse versions < 1.2.0-2+deb10u2. Fixed in 1.2.0-2+deb10u2. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The node-url-parse package is a Node.js module used to parse URLs. It is responsible for extracting various components of a URL, such as the protocol, hostname, port, path, query parameters, and fragments. This package is widely used in Node.js applications to handle and manipulate URLs. However, multiple vulnerabilities have been discovered in the package that can lead to authorization bypass and redirection to untrusted sites.

Vulnerability Detail

The vulnerabilities in the node-url-parse package are as follows:

  1. CVE-2021-3664: The package mishandles certain uses of a single (back)slash in the URL, interpreting it as a relative path instead of a normal slash. This can result in allow/block list bypasses, SSRF attacks, open redirects, or other undesired behavior.

  2. CVE-2021-27515: The package incorrectly handles backslashes in the protocol, considering them as relative paths. An application that validates a URL using node-url-parse might pass a malicious link.

  3. CVE-2022-0512: Incorrect handling of username and password can lead to failure to properly identify the hostname, resulting in authorization bypass.

  4. CVE-2022-0639: Incorrect conversion of @ characters in the protocol in the href field can lead to failure to properly identify the hostname, resulting in authorization bypass.

  5. CVE-2022-0686: The package fails to find the correct hostname when no port number is provided in the URL, potentially leading to SSRF attacks, open redirects, or other vulnerabilities that depend on the hostname field.

  6. CVE-2022-0691: The package fails to find the correct hostname when the URL contains a backspace (\b) character, tricking the parser into interpreting the URL as a relative path and bypassing hostname checks.

How To Fix

Minimum fixed version

1.2.0-2+deb10u2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-url-parse

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

Conclusion

The node-url-parse package is vulnerable to multiple security issues that can result in authorization bypass and redirection to untrusted sites. To mitigate these risks, it is crucial to upgrade to version 1.2.0-2+deb10u2 or later. It is also recommended to use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by these vulnerabilities. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for node-url-parse →

Share this vulnerability

FAQ

These vulnerabilities can potentially lead to authorization bypass, SSRF attacks, open redirects, or other undesired behavior. Attackers may exploit these vulnerabilities to bypass security measures, redirect users to malicious sites, or perform unauthorized actions.

Yes, all versions of the node-url-parse package prior to version 1.2.0-2+deb10u2 are affected by these vulnerabilities. It is crucial to update to the fixed version to mitigate the risks.

No, there is no known workaround for these vulnerabilities. It is recommended to update the package to the fixed version as soon as possible.

You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by these vulnerabilities. Simply upload your package-lock.json file, and Vulert will analyze it in real-time to identify any open-source vulnerabilities, including the ones in the node-url-parse package.

You can find more information about these vulnerabilities, including their CVE identifiers, on the Debian Security Tracker page for the node-url-parse package: https://security-tracker.debian.org/tracker/node-url-parse

Related vulnerabilities

Recent vulnerabilities recorded for node-url-parse.

How To Fix

Minimum fixed version

1.2.0-2+deb10u2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-url-parse

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