CVE-2021-33503: urllib3 Catastrophic Backtracking Vulnerability
Summary
CVE-2021-33503: Catastrophic backtracking in URL authority parser when passed URL containing many @ characters. Affects urllib3 versions >= 1.25.4, < 1.26.5. Fixed in 1.26.5. How to fix ↓
Also tracked for
- python-urllib3 · Debian:11
The same CVE-2021-33503 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
urllib3 is a Python library that provides a high-level interface for making HTTP requests. It is commonly used in various Python applications and frameworks. The library allows developers to send HTTP requests, handle responses, and manage connections. However, urllib3 versions prior to 1.26.5 are vulnerable to a catastrophic backtracking issue in the URL authority parser. This vulnerability can be exploited by passing a URL with multiple @ characters in the authority component. As a result, the regular expression used for parsing the authority component exhibits catastrophic backtracking, leading to a denial of service (DoS) condition. This vulnerability has been assigned the CVE identifier CVE-2021-33503.
Vulnerability Detail
The vulnerability in urllib3 arises from a flaw in the authority regular expression used for parsing URLs. When an attacker provides a URL with a large number of @ characters in the authority component, the regular expression exhibits catastrophic backtracking. This can cause the application to consume excessive CPU resources and enter a DoS state. An attacker can exploit this vulnerability by passing a malicious URL as a parameter or redirecting the application to a URL containing the malicious pattern. The impact of this vulnerability is a denial of service, potentially affecting the availability of the application or system. The Common Vulnerability Scoring System (CVSS) score for this vulnerability is 7.5 (High).
How To Fix
Latest published version: 2.8.0 as of 23 Oct 2026
pip install --upgrade "urllib3==2.8.0"
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.26.5
This is the first release that contains the fix.
pip install --upgrade "urllib3==1.26.5"
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 essential to upgrade urllib3 to the patched version to mitigate the risk.
Conclusion
The urllib3 library prior to version 1.26.5 is vulnerable to a catastrophic backtracking issue in the URL authority parser. This vulnerability can be exploited to cause a denial of service condition. It is highly recommended to upgrade urllib3 to version 1.26.5 or later to mitigate the risk. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for urllib3 →
FAQ
urllib3 is a Python library that provides a high-level interface for making HTTP requests. It is commonly used in various Python applications and frameworks.
The vulnerability allows an attacker to cause a denial of service (DoS) condition by exploiting the catastrophic backtracking issue in the URL authority parser.
To fix this vulnerability, upgrade urllib3 to version 1.26.5 or later.
No, there is no known workaround. It is crucial to upgrade urllib3 to the patched version.
The CVSS score for this vulnerability is 7.5 (High).
References
Related vulnerabilities
Recent vulnerabilities recorded for urllib3.