{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2020-7212","id":"CVE-2020-7212","title":"Uncontrolled Resource Consumption in urllib3","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-enc","descriptionLong":"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).","published":"2020-03-06T19:14:54.000Z","updated":"2026-10-20T10:54:23.662174666Z","reserved":"2020-01-16T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"high","source":"GitHub"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub"},{"version":"2.0","score":7.8,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:C","rating":"high","source":"NVD"}],"rating":"high","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"status":"affected","version":"n/a"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"urllib3","purl":"pkg:pypi/urllib3","ranges":[">=1.25.2 <1.25.8"],"fixed":["1.25.8"],"advisory":"GHSA-hmv2-79q8-fv6g"}],"cwes":["CWE-400"],"aliases":["GHSA-hmv2-79q8-fv6g","PYSEC-2020-149"],"references":[{"url":"https://github.com/urllib3/urllib3/blob/master/CHANGES.rst","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","advisory","web"]},{"url":"https://github.com/urllib3/urllib3/commit/a74c9cfbaed9f811e7563cfc3dce894928e0221a","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://pypi.org/project/urllib3/1.25.8/","tags":["x_refsource_MISC","x_transferred","Release Notes","Vendor Advisory","advisory","package"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7212","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-hmv2-79q8-fv6g","tags":["advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/urllib3/PYSEC-2020-149.yaml","tags":["web"]},{"url":"https://github.com/urllib3/urllib3","tags":["package"]},{"url":"https://pypi.org/project/urllib3/1.25.8","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.03371,"epssPercentile":0.88996,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2020-7212","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7212","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2020-7212","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-hmv2-79q8-fv6g","ok":true,"note":"GHSA-hmv2-79q8-fv6g"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2020-7212","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}