ReDoS Vulnerability in normalize-url Package Affects node-got

node-got Updated 02 Oct 2025

Summary

24/05/2021
N/A
Yes i
High
7.5

CVE-2021-33502: The normalize-url package before 4.5.1, 5.x before 5.3.1, and 6.x before 6.0.1 for Node.js has a ReDoS (regular expression denial of service) issue because it has exponential performance for data: URLs. Affects node-got across 2 version ranges.

< 11.8.1+~cs53.13.17-3 < 305e3f22efb87505d3bc87c17c50b1ef67789acb

Fixed in 11.8.1+~cs53.13.17-3. 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

The normalize-url package is a widely used Node.js library that normalizes URLs by removing unnecessary characters and ensuring a consistent format. It is often utilized in various applications to handle URL inputs effectively. However, certain versions of this package are vulnerable to a Regular Expression Denial of Service (ReDoS) attack, which can lead to performance degradation when processing specific types of URLs, particularly data: URLs.

Vulnerability Detail

The vulnerability, identified as CVE-2021-33502, arises from the use of regular expressions in the normalize-url package, which can exhibit exponential performance issues when handling certain inputs. This can allow an attacker to exploit the vulnerability by sending specially crafted data: URLs, causing the application to hang or crash due to excessive resource consumption. The affected versions include normalize-url versions before 4.5.1, 5.x before 5.3.1, and 6.x before 6.0.1. The potential ramifications include service downtime and degraded performance, which can significantly impact user experience and application reliability.

How To Fix

Minimum fixed version

11.8.1+~cs53.13.17-3

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-got

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

Workaround

If immediate updating is not feasible, consider implementing input validation to filter out potentially malicious data: URLs before they are processed by the normalize-url package. This can help mitigate the risk of exploitation until a proper update can be applied.

Conclusion

The CVE-2021-33502 vulnerability in the normalize-url package poses a significant risk to applications using affected versions. It is crucial to update to the latest version to mitigate potential attacks. Additionally, implementing input validation can serve as a temporary workaround until updates are applied.

See every vulnerability recorded for node-got →

Share this vulnerability

FAQ

CVE-2021-33502 is a vulnerability in the normalize-url package that allows for a ReDoS attack due to inefficient regular expressions.

Versions before 4.5.1, 5.x before 5.3.1, and 6.x before 6.0.1 are affected by this vulnerability.

Exploitation of this vulnerability can lead to application crashes and significant performance degradation, impacting user experience.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score of CVE-2021-33502 is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for node-got.

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

Minimum fixed version

11.8.1+~cs53.13.17-3

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-got

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