Regular Expression Denial of Service in Python urllib - CVE-2021-3733

python3.4 Updated 02 Oct 2025

Summary

02/09/2021
N/A
Yes i
Medium
6.5

UBUNTU-CVE-2021-3733: There's a flaw in urllib's AbstractBasicAuthHandler class. Affects python3.4 versions < 3.4.3-1ubuntu1~14.04.7+esm11. Fixed in 3.4.3-1ubuntu1~14.04.7+esm11. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Python urllib package is a widely used library for handling URLs and making HTTP requests in Python applications. It provides functionalities for opening and reading URLs, handling various protocols, and managing authentication. This package is essential for developers who need to interact with web resources programmatically. However, it has been found to be vulnerable to a Regular Expression Denial of Service (ReDOS) attack, which can affect the availability of applications relying on this library.

Vulnerability Detail

CVE-2021-3733 is a vulnerability in the urllib's AbstractBasicAuthHandler class. An attacker controlling a malicious HTTP server can exploit this flaw by sending a specially crafted payload during an authentication request. This can lead to a Regular Expression Denial of Service (ReDOS), causing the application to become unresponsive. The vulnerability poses a significant threat to application availability, especially for those that rely heavily on HTTP communications.

How To Fix

Minimum fixed version

3.4.3-1ubuntu1~14.04.7+esm11

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python3.4

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

Workaround

If immediate patching is not possible, consider implementing input validation to sanitize user inputs and avoid sending potentially malicious requests to the server. Additionally, you can limit the types of requests your application accepts to mitigate the risk of exploitation.

Conclusion

CVE-2021-3733 represents a significant vulnerability in the Python urllib package that can lead to Denial of Service attacks. It is crucial for developers to update their packages to the patched versions to ensure the security and availability of their applications. Implementing input validation can also serve as a temporary workaround until the update is applied.

See every vulnerability recorded for python3.4 →

Share this vulnerability

FAQ

CVE-2021-3733 is a vulnerability in the Python urllib package that allows for a Regular Expression Denial of Service (ReDOS) attack.

If your application uses urllib and connects to potentially malicious HTTP servers, it may become unresponsive due to this vulnerability.

The vulnerability affects multiple versions of Python, including 3.4, 3.5, 3.6, 3.7, 3.8, and 3.9.

You can use Vulert, which monitors open-source vulnerabilities in your software using a manifest file. Visit Vulert Scanner to check your application without signing up.

The CVSS score for CVE-2021-3733 is 6.5, indicating a medium severity level.

Related vulnerabilities

Recent vulnerabilities recorded for python3.4.

How To Fix

Minimum fixed version

3.4.3-1ubuntu1~14.04.7+esm11

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python3.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