Authorization Bypass Vulnerability in node-url-parse: CVE-2022-0512

node-url-parse Updated 02 Oct 2025

Summary

14/02/2022
N/A
Yes i
Medium
5.3

CVE-2022-0512: Authorization Bypass Through User-Controlled Key in NPM url-parse prior to 1.5.6. Affects node-url-parse across 2 version ranges.

< 1.5.3-1+deb11u2 < 9be7ee88afd2bb04e4d5a1a8da9a389ac13f8c40

Fixed in 1.5.3-1+deb11u2. 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

node-url-parse is a popular JavaScript library used for parsing URLs in Node.js applications. It provides a simple interface for extracting components from URLs, making it easier for developers to manipulate and validate URL structures. However, this package has been found to have a critical vulnerability that allows unauthorized access due to improper handling of user-controlled keys.

Vulnerability Detail

CVE-2022-0512 is an authorization bypass vulnerability that affects versions of node-url-parse prior to 1.5.6. The vulnerability arises from the way the library processes user-controlled keys, which can lead to unauthorized access to sensitive data. Attackers can exploit this flaw to manipulate URL parsing, potentially gaining access to restricted resources or executing unauthorized actions within an application. The CVSS score for this vulnerability is 5.3, indicating a moderate level of risk.

How To Fix

Minimum fixed version

1.5.3-1+deb11u2

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 →

Workaround

If immediate upgrading is not feasible, consider implementing input validation to sanitize user-controlled keys before they are processed by the node-url-parse library. This can help mitigate the risk of unauthorized access until a proper update can be applied.

Conclusion

The CVE-2022-0512 vulnerability in the node-url-parse package poses a significant risk due to its potential for unauthorized access. It is crucial for developers using this library to update to the latest version to safeguard their applications. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for node-url-parse →

Share this vulnerability

FAQ

CVE-2022-0512 is a vulnerability in the node-url-parse library that allows for authorization bypass through user-controlled keys.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which analyzes your package-lock.json file for vulnerabilities.

Exploitation of this vulnerability could allow attackers to gain unauthorized access to sensitive data or perform actions that should be restricted.

You can update the package using the command 'sudo apt-get install node-url-parse' after running 'sudo apt-get update' to ensure you have the latest package information.

Yes, you can implement input validation to sanitize user-controlled keys as a temporary workaround until you can apply the necessary updates.

Related vulnerabilities

Recent vulnerabilities recorded for node-url-parse.

How To Fix

Minimum fixed version

1.5.3-1+deb11u2

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