{"schemaVersion":3,"id":"CVE-2020-7212","aliases":["GHSA-hmv2-79q8-fv6g","PYSEC-2020-149","UBUNTU-CVE-2020-7212","DEBIAN-CVE-2020-7212"],"status":"published","duplicateOf":null,"title":null,"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).","dates":{"published":"2020-03-06T19:14:54.000Z","modified":"2024-08-04T09:25:48.318Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.8,"severity":"high","version":"2.0","versionLabel":"v2.0","source":"NVD","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:C","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"OSV · Pypi","score":8.7,"severity":"high","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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":7.8,"severity":"high","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:C","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.03371,"percentile":0.88604,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.03371},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.03371,"percentile":0.88604}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.03371,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.03371,"percentile":0.88604}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption","description":"The product does not properly control the allocation and maintenance of a limited resource.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/400.html"}],"affected":[{"vendor":"debian","product":"python-urllib3","name":"python-urllib3","label":"python-urllib3","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/python-urllib3","purlType":"deb","versions":[{"text":"< 1.25.8-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.25.8-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"python-urllib3","name":"python-urllib3","label":"python-urllib3","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/python-urllib3","purlType":"deb","versions":[{"text":"< 1.25.8-2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.25.8-2","eol":null,"hubHref":null},{"vendor":"PyPI","product":"urllib3","name":"urllib3","label":"urllib3","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/urllib3","purlType":"pypi","versions":[{"text":"< a74c9cfbaed9f811e7563cfc3dce894928e0221a","noFixRecorded":false,"fixedIn":null},{"text":"≥ 1.25.2, < 1.25.8","noFixRecorded":false,"fixedIn":null}],"versionsText":"< a74c9cfbaed9f811e7563cfc3dce894928e0221a | ≥ 1.25.2, < 1.25.8","eol":null,"hubHref":null},{"vendor":"python","product":"urllib3","name":"urllib3","label":"urllib3","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.25.2, ≤ 1.25.7","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.25.2, ≤ 1.25.7","eol":null,"hubHref":"/vendor/python/urllib3"}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/urllib3/urllib3/blob/master/CHANGES.rst","label":"github.com/urllib3/urllib3/blob/master/CHANGES.rst","hostname":"github.com","tags":["X Refsource MISC","WEB","REPORT","Release Notes","Third Party Advisory"]},{"url":"https://github.com/urllib3/urllib3/commit/a74c9cfbaed9f811e7563cfc3dce894928e0221a","label":"github.com/urllib3/urllib3/commit/a74c9cfbaed9f811e7563cfc3dce894928e0221a","hostname":"github.com","tags":["X Refsource MISC","WEB","FIX","REPORT","Patch","Third Party Advisory"]},{"url":"https://pypi.org/project/urllib3/1.25.8/","label":"pypi.org/project/urllib3/1.25.8/","hostname":"pypi.org","tags":["X Refsource MISC","PACKAGE","REPORT","Release Notes","Vendor Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7212","label":"nvd.nist.gov/vuln/detail/CVE-2020-7212","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/advisories/GHSA-hmv2-79q8-fv6g","label":"github.com/advisories/GHSA-hmv2-79q8-fv6g","hostname":"github.com","tags":["Advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/urllib3/PYSEC-2020-149.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/urllib3/PYSEC-2020-149.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/urllib3/urllib3","label":"github.com/urllib3/urllib3","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://pypi.org/project/urllib3/1.25.8","label":"pypi.org/project/urllib3/1.25.8","hostname":"pypi.org","tags":["WEB"]},{"url":"https://ubuntu.com/security/CVE-2020-7212","label":"ubuntu.com/security/CVE-2020-7212","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://github.com/urllib3/urllib3/pull/1787","label":"github.com/urllib3/urllib3/pull/1787","hostname":"github.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-7212","label":"www.cve.org/CVERecord?id=CVE-2020-7212","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2020-7212","label":"security-tracker.debian.org/tracker/CVE-2020-7212","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2020-03-06T19:14:54.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-04T09:25:48.318Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":32,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T08:24:46.535Z","stale":false,"partial":false}}