# CVE-2021-33503: urllib3 ReDoS in URL authority parser

Source: https://junglewise.ai/threats/cve-2021-33503-urllib3-redos-in-url-authority-parser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-06-01. Updated: 2026-06-09  
License: CC BY 4.0 with a link back

CVE-2021-33503 · Severity: high · CVSS 7.5 · Published 2021-06-01

urllib3 is a widely used Python library for making web requests. A flaw in how it processes web addresses (URLs) allows an attacker to crash or significantly slow down an application by providing a specially crafted URL. This can lead to a denial-of-service, making the affected application or service unavailable to legitimate users.

Technologies: [urllib3 (PyPI)](https://junglewise.ai/threats/technologies/urllib3). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2021-33503 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-33503 being exploited in the wild.

**How severe is CVE-2021-33503?** High severity, with a CVSS score of 7.5, published 1 June 2021.

**Which products and versions are affected?** urllib3 (PyPI) >= 1.25.4, < 1.26.5, ECOSYSTEM:introduced=1.25.4,fixed=1.26.5, GIT:introduced=0,fixed=2d4a3fee6de2fa45eb82169361918f759269b4ec|ECOSYSTEM:introduced=1.25.4,fixed=1.26.5.

**Is there a fix for CVE-2021-33503?** Yes. urllib3 (PyPI): upgrade to 1.26.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-33503 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2021-33503?** Check whether you run urllib3 (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- urllib3 (PyPI): upgrade to 1.26.5 or later

  ```sh
  pip install "urllib3>=1.26.5"
  ```


## Technical details

A Regular Expression Denial of Service (ReDoS) vulnerability exists in urllib3 due to catastrophic backtracking in the URL authority parser. When the library processes a URL containing a large number of '@' characters in the authority component, the regular expression engine requires exponential time to evaluate the input. This can be triggered remotely if an application passes attacker-controlled URLs to urllib3 or follows a malicious HTTP redirect. The issue is fixed in version 1.26.5 by optimizing the regular expression used for parsing.

## Affected products

- urllib3 urllib3 >= 1.25.4, < 1.26.5

## Identifiers

- CVE-2021-33503
- GHSA-q2q7-5pp4-w6pg
- PYSEC-2021-108

## Timeline

- 2021-05-26: disclosed
- 2021-05-28: patched: Fix merged in version 1.26.5
- 2021-06-01: advisory

## References

- [https://api.github.com/users/NariyoshiChida](https://api.github.com/users/NariyoshiChida)
- [https://github.com/NariyoshiChida](https://github.com/NariyoshiChida)
- [https://api.github.com/users/NariyoshiChida/gists%7B/gist_id%7D](https://api.github.com/users/NariyoshiChida/gists%7B/gist_id%7D)
- [https://api.github.com/users/NariyoshiChida/repos](https://api.github.com/users/NariyoshiChida/repos)
- [https://avatars.githubusercontent.com/u/11674670?v=4](https://avatars.githubusercontent.com/u/11674670?v=4)
- [https://api.github.com/users/NariyoshiChida/events%7B/privacy%7D](https://api.github.com/users/NariyoshiChida/events%7B/privacy%7D)

## Related threats

- [urllib3 HTTP client unbounded memory allocation in chunked transfer](https://junglewise.ai/threats/cve-2026-97689-urllib3-is-an-http-client-library-for-python-from-1-10-3-until-2)
- [urllib3 infinite loop in Deflate decoder](https://junglewise.ai/threats/cve-2026-97688-urllib3-is-an-http-client-library-for-python-from-2-6-2-until-2-8)
- [urllib3 HTTPS proxy TLS settings isolation](https://junglewise.ai/threats/cve-2026-97687-urllib3-is-an-http-client-library-for-python-from-1-26-0-until-2)
- [PYSEC-2026-1997 - urllib3 does not control redirects in browsers and Node.js](https://junglewise.ai/threats/cve-2025-50182-urllib3-does-not-control-redirects-in-browsers-and-node-js)
- [PYSEC-2026-1999 - urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation](https://junglewise.ai/threats/cve-2025-50181-urllib3-redirects-are-not-disabled-when-retries-are-disabled-on)
