CVE-2020-7212
Summary
| CVE | CVE-2020-7212 |
|---|---|
| State | PUBLIC |
| Assigner | [email protected] |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2020-03-06 20:15:00 UTC |
| Updated | 2020-03-09 16:55:00 UTC |
| 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). |
Risk And Classification
Problem Types: CWE-400
NVD Known Affected Configurations (CPE 2.3)
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| Percent-encode invalid characters with request target (#1586) · urllib3/urllib3@a74c9cf · GitHub | MISC | github.com | Patch, Third Party Advisory |
| urllib3/CHANGES.rst at master · urllib3/urllib3 · GitHub | MISC | github.com | Release Notes, Third Party Advisory |
| urllib3 · PyPI | MISC | pypi.org | Release Notes, Vendor Advisory |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Legacy QID Mappings
- 982695 Python (pip) Security Update for urllib3 (GHSA-hmv2-79q8-fv6g)