Home / Python / Urllib3 / CVE-2020-7212
CVE-2020-7212: is it exploited, and which versions of Python Urllib3 are affected and fixed?
CVE-2020-7212 is a denial of service (uncontrolled resource consumption) vulnerability in Python Urllib3. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 11:38 UTC). Affected: urllib3 from 1.25.2 before 1.25.8 (GitHub advisory GHSA-hmv2-79q8-fv6g). Fixed in 1.25.8 (GitHub advisory GHSA-hmv2-79q8-fv6g). Severity: High (7.5, CVSS 3.1, from NVD).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 11:38 UTC, CVE record November 19, 2026, 07:16 UTC and NVD November 19, 2026, 08:12 UTC.
What is CVE-2020-7212?
The _encode_invalid_chars function in util/url.py in the urllib3 library 1.25.2 through 1.25.7 for Python allows a denial of service (CPU consumption) because of an inefficient algorithm. The percent_encodings array contains all matches of percent encodings. It is not deduplicated. For a URL of length N, the size of percent_encodings may be up to O(N). The next step (normalize existing percent-encoded bytes) also takes up to O(N) for each step, so the total time is O(N^2). If percent_encodings were deduplicated, the time to compute _encode_invalid_chars would be O(kN), where k is at most 484 ((10+6*2)^2).
From the CVE record by mitre, last updated August 4, 2024, 09:25 UTC.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| PyPI | urllib3 | >= 1.25.2, < 1.25.8 | 1.25.8 | GHSA-hmv2-79q8-fv6g |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated November 18, 2024. Summary: Uncontrolled Resource Consumption in urllib3.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| python | urllib3 | from 1.25.2 through 1.25.7 | application |
NVD analysis (status Modified), last modified June 17, 2026, 03:24 UTC.
How severe is CVE-2020-7212?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 7.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H | NVD |
| High 7.8 | CVSS 2.0 | AV:N/AC:L/Au:N/C:N/I:N/A:C | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2020-7212 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 3.37% probability of exploitation activity in the next 30 days, percentile 89.1 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-400 Uncontrolled Resource Consumption
Where are the vendor advisories and references?
- https://github.com/urllib3/urllib3/blob/master/CHANGES.rst x_refsource_MISC
- https://github.com/urllib3/urllib3/commit/a74c9cfbaed9f811e7563cfc3dce894928e0221a x_refsource_MISC
- https://pypi.org/project/urllib3/1.25.8/ x_refsource_MISC
When was it published, and where is the official record?
- Reserved
- January 16, 2020
- Published
- March 6, 2020, 19:14 UTC
- CVE record updated
- August 4, 2024, 09:25 UTC by mitre
- NVD
- Modified, last modified June 17, 2026, 03:24 UTC
- Last checked
- CVE list November 19, 2026, 07:16 UTC; NVD November 19, 2026, 08:12 UTC; KEV December 3, 2026, 11:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect Urllib3?
- Oct 15, 2023CVE-2018-25091 Python Urllib3: open redirect
- Jun 29, 2021CVE-2021-33503 Python Urllib3: denial of service (uncontrolled resource consumption)
- Mar 15, 2021CVE-2021-28363 Python Urllib3: improper certificate validation
- Sep 29, 2020CVE-2020-26137 Python Urllib3: injection
- Apr 18, 2019CVE-2019-11324 Python Urllib3: improper certificate validation
- Apr 15, 2019CVE-2019-11236 Python Urllib3: improper Neutralization of CRLF Sequences
- Dec 11, 2018CVE-2018-20060 Python Urllib3: information disclosure
- Jan 11, 2017CVE-2016-9015 Python Urllib3: improper certificate validation
Questions about CVE-2020-7212
Is CVE-2020-7212 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 11:38 UTC. FIRST's EPSS gives it a 3.37% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of Python Urllib3 are affected by CVE-2020-7212?
urllib3 from 1.25.2 before 1.25.8, per the GitHub advisory GHSA-hmv2-79q8-fv6g. The tables above give every range the sources list.
Which version fixes CVE-2020-7212?
1.25.8, per the GitHub advisory GHSA-hmv2-79q8-fv6g. Check the vendor's advisory before you rely on it.
How severe is CVE-2020-7212?
High (7.5, CVSS 3.1, from NVD). The severity table above shows each score with its source.
Where is the official record of CVE-2020-7212?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.