{"cve":"CVE-2020-7212","nvd":{"published":"2020-03-06T20:15:12.707","modified":"2026-06-17T03:24:31.450","status":"Modified","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).","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-400"],"references":["https://github.com/urllib3/urllib3/blob/master/CHANGES.rst","https://github.com/urllib3/urllib3/commit/a74c9cfbaed9f811e7563cfc3dce894928e0221a","https://pypi.org/project/urllib3/1.25.8/","https://github.com/urllib3/urllib3/blob/master/CHANGES.rst","https://github.com/urllib3/urllib3/commit/a74c9cfbaed9f811e7563cfc3dce894928e0221a"],"products":["python:urllib3"],"source":"nvd","synced_at":"2026-10-19T21:02:53.949909883+00:00"},"epss":{"cve":"CVE-2020-7212","score":0.03371,"percentile":0.88754,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-hmv2-79q8-fv6g","url":"https://osv.dev/vulnerability/GHSA-hmv2-79q8-fv6g","summary":"Uncontrolled Resource Consumption in urllib3","modified":"2024-11-18T22:35:00.503678Z","packages":[{"ecosystem":"PyPI","name":"urllib3","purl":"pkg:pypi/urllib3","ranges":[">=1.25.2 <1.25.8"],"fixed":["1.25.8"]}]},{"id":"PYSEC-2020-149","url":"https://osv.dev/vulnerability/PYSEC-2020-149","summary":"","modified":"2023-11-08T04:03:58.967412Z","packages":[{"ecosystem":"PyPI","name":"urllib3","purl":"pkg:pypi/urllib3","ranges":[">=1.25.2 <1.25.8"],"fixed":["1.25.8"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}