CVE-2020-7212 json
Uncontrolled Resource Consumption in urllib3
published 6y ago modified 4mo ago also GHSA-hmv2-79q8-fv6g , PYSEC-2020-149 , EUVD-2020-0231
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.4%
- EPSS 3.4% chance of exploitation in 30 days, percentile 88%
- public exploits
- 0
- none known
Summary
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).
Patch / fix
- pypi urllib3 1.25.8
- python-urllib3 Debian 14, Debian 13, Debian 12 1.25.8-1
debian advisories DEBIAN-CVE-2020-7212
Is CVE-2020-7212 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2020-7212 updated cvss 0.0
python-urllib3: inefficient algorithm allows a DoS (CPU consumption) in _encode_invalid_chars function in util/url.py
-
Red Hat Enterprise Linux 6 python-urllib3 Red Hat Enterprise Linux 7 python-urllib3 Red Hat Enterprise Linux 8 python-urllib3, python3-urllib3 Red Hat OpenShift Container Platform 3.11 python-urllib3, python2-urllib3 Red Hat OpenShift Container Platform 4 python-urllib3, python2-urllib3 Red Hat OpenStack Platform 10 (Newton) python-urllib3not affected: vulnerable code not present
+6 more productsfewer
Red Hat OpenStack Platform 13 (Queens) python2-urllib3 Red Hat OpenStack Platform 15 (Stein) python3-urllib3 Red Hat Quay 3 python-urllib3 Red Hat Satellite 6 python-urllib3, python3-urllib3 Red Hat Software Collections rh-python38-python-urllib3, rh-mongodb36-python-urllib3 Red Hat Storage 3 python-urllib3, python2-urllib3
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
3.37% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 7.8 | AV:N/AC:L/Au:N/C:N/I:N/A:C |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | urllib3 | >=1.25.2, <1.25.8 |
1.25.8 |
Classification
- Weakness
-
- CWE-400 Uncontrolled Resource Consumption
References
-
github.com
/urllib3/urllib3/commit/a74c9cfbaed9f811e7563cfc3dce894928e0221a
web, patch, third-party-advisory
-
pypi.org
/project/urllib3/1.25.8/
release-notes, vendor-advisory, package
-
github.com
/urllib3/urllib3/blob/master/CHANGES.rst
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2020-7212
advisory
-
github.com
/advisories/GHSA-hmv2-79q8-fv6g
advisory
-
github.com
/pypa/advisory-database/tree/main/vulns/urllib3/PYSEC-2020-149.yaml
web
-
github.com
/urllib3/urllib3
package
-
pypi.org
/project/urllib3/1.25.8
web
Sources
- CVE List CVE-2020-7212
- GitHub Advisory GHSA-hmv2-79q8-fv6g
- NVD CVE-2020-7212
- OSV PYSEC-2020-149
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.