CVE-2020-7212

unknown
Published 2021-04-30 · Modified 2023-11-08
CVSS v3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS v2
VIR risk

Description

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

Predictions

Exploit likelihood
30%
Patch ETA

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

vendor Authored 2026-05-27

Vendor advisory: debian — https://security-tracker.debian.org/tracker/CVE-2020-7212

OS impact

OSVersionStatusFixed in
debian debianbookwormfixed1.25.8-1
debian debianbullseyefixed1.25.8-1
debian debianforkyfixed1.25.8-1
debian debiansidfixed1.25.8-1
debian debiantrixiefixed1.25.8-1

Package impact

EcosystemPackageVulnerableFixed
python PyPIurllib3>=1.25.2,<1.25.81.25.8
python PyPIurllib3<a74c9cfbaed9f811e7563cfc3dce894928e0221a||>=1.25.2,<1.25.8a74c9cfbaed9f811e7563cfc3dce894928e0221a

References

Verify integrity in audit chain (admin only). AS-IS.