Skip to content
Fencer Vulns
high 7.5

CVE-2020-7212 json

Uncontrolled Resource Consumption in urllib3

published 2020-03-06 6 y ago modified 2026-06-17 4 mo 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

Vendor 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-urllib3
    +6 more products
    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
    not affected: vulnerable code not present

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-08).

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

Sources

Fencer Vulns 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.