{"id":"CVE-2020-7212","aliases":["DEBIAN-CVE-2020-7212","EUVD-2020-0231","GHSA-hmv2-79q8-fv6g","PYSEC-2020-149","ROOT-APP-PYPI-CVE-2020-7212","UBUNTU-CVE-2020-7212"],"status":"published","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-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).","severity":{"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","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.03371,"percentile":0.88841,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-400"],"published":"2020-03-06T19:14:54Z","modified":"2026-10-26T12:02:15Z","fixes":[{"ecosystem":"PyPI","package":"urllib3","fixed_in":["1.25.8"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"python-urllib3","fixed_in":["1.25.8-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"python-urllib3","fixed_in":["1.25.8-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"python-urllib3","fixed_in":["1.25.8-1"],"sources":["osv"]},{"ecosystem":"Root:PyPI","package":"rootio-urllib3","fixed_in":["1.25.6+root.io.1","1.25.6+root.io.2","1.25.5+root.io.1","1.25.6+root.io.3","1.25.7+root.io.1","1.25.5+root.io.2","1.25.4+root.io.4","1.25.6+root.io.4","1.25.5+root.io.3","1.25.6+root.io.5","1.25.5+root.io.4","1.25.5+root.io.5","1.25.4+root.io.5","1.25.7+root.io.2","1.25.7+root.io.3","1.25.4+root.io.6","1.25.7+root.io.4","1.25.6+root.io.6","1.25.7+root.io.5","1.25.5+root.io.6","1.25.4+root.io.7","1.25.6+root.io.7","1.25.6+root.io.8","1.25.5+root.io.7","1.25.4+root.io.8","1.25.5+root.io.8","1.25.7+root.io.6","1.25.6+root.io.9","1.25.4+root.io.9"],"sources":["osv"]},{"ecosystem":"Root:PyPI","package":"urllib3","fixed_in":["1.25.6+aikido.8","1.25.5+aikido.7","1.25.4+aikido.8","1.25.5+aikido.8","1.25.7+aikido.6","1.25.6+aikido.9","1.25.4+aikido.9"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"urllib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.25.2"},{"last_affected":"1.25.7"},{"fixed":"1.25.8"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"python-urllib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.25.8-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"python-urllib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.25.8-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"python-urllib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.25.8-1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"urllib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.25.2"},{"fixed":"1.25.8"}]}],"versions":["1.25.2","1.25.3","1.25.4","1.25.5","1.25.6","1.25.7"]},{"source":"osv","ecosystem":"PyPI","package":"urllib3","ranges":[{"type":"GIT","events":[{"introduced":"0"},{"fixed":"a74c9cfbaed9f811e7563cfc3dce894928e0221a"}]},{"type":"ECOSYSTEM","events":[{"introduced":"1.25.2"},{"fixed":"1.25.8"}]}],"versions":["1.25.2","1.25.3","1.25.4","1.25.5","1.25.6","1.25.7"]},{"source":"osv","ecosystem":"Root:PyPI","package":"rootio-urllib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.25.6+root.io.1"},{"fixed":"1.25.6+root.io.2"},{"fixed":"1.25.5+root.io.1"},{"fixed":"1.25.6+root.io.3"},{"fixed":"1.25.7+root.io.1"},{"fixed":"1.25.5+root.io.2"},{"fixed":"1.25.4+root.io.4"},{"fixed":"1.25.6+root.io.4"},{"fixed":"1.25.5+root.io.3"},{"fixed":"1.25.6+root.io.5"},{"fixed":"1.25.5+root.io.4"},{"fixed":"1.25.5+root.io.5"},{"fixed":"1.25.4+root.io.5"},{"fixed":"1.25.7+root.io.2"},{"fixed":"1.25.7+root.io.3"},{"fixed":"1.25.4+root.io.6"},{"fixed":"1.25.7+root.io.4"},{"fixed":"1.25.6+root.io.6"},{"fixed":"1.25.7+root.io.5"},{"fixed":"1.25.5+root.io.6"},{"fixed":"1.25.4+root.io.7"},{"fixed":"1.25.6+root.io.7"},{"fixed":"1.25.6+root.io.8"},{"fixed":"1.25.5+root.io.7"},{"fixed":"1.25.4+root.io.8"},{"fixed":"1.25.5+root.io.8"},{"fixed":"1.25.7+root.io.6"},{"fixed":"1.25.6+root.io.9"},{"fixed":"1.25.4+root.io.9"}]}]},{"source":"osv","ecosystem":"Root:PyPI","package":"urllib3","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.25.6+aikido.8"},{"fixed":"1.25.5+aikido.7"},{"fixed":"1.25.4+aikido.8"},{"fixed":"1.25.5+aikido.8"},{"fixed":"1.25.7+aikido.6"},{"fixed":"1.25.6+aikido.9"},{"fixed":"1.25.4+aikido.9"}]}]}],"products":[{"vendor":"python","product":"urllib3"}],"references":[{"url":"https://github.com/urllib3/urllib3/blob/master/CHANGES.rst","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/urllib3/urllib3/commit/a74c9cfbaed9f811e7563cfc3dce894928e0221a","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web","report"]},{"url":"https://pypi.org/project/urllib3/1.25.8/","tags":["x_refsource_MISC","x_transferred","Release Notes","Vendor Advisory","advisory","package","report"]},{"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://pypi.org/project/urllib3/1.25.8","tags":["web"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2020-7212","tags":["advisory"]},{"url":"https://github.com/urllib3/urllib3","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2020-7212","tags":["report"]},{"url":"https://github.com/urllib3/urllib3/pull/1787","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2020-7212","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2020-7212","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).","status":"published","published":"2020-03-06T19:14:54Z","modified":"2024-08-04T09:25:48.318Z","updated_at":"2026-11-02T14:35:58.331892Z"}],"euvd":[{"id":"EUVD-2020-0231","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).","status":"published","published":"2020-03-06T19:14:54Z","modified":"2024-08-04T09:25:48Z","updated_at":"2026-11-03T03:08:00.597336Z"}],"ghsa":[{"id":"GHSA-hmv2-79q8-fv6g","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-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).","status":"published","published":"2021-04-30T17:31:43Z","modified":"2024-11-18T22:23:06Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high"},{"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","level":"high"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:38:20.833758Z"}],"nvd":[{"id":"CVE-2020-7212","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).","status":"published","published":"2020-03-06T20:15:12.707Z","modified":"2026-06-17T03:24:31.45Z","cvss":[{"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","level":"high","assessor":"primary"},{"version":"2.0","score":7.8,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:C","level":"high","assessor":"primary"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:05:54.796125Z"}],"osv":[{"id":"CVE-2020-7212","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).","status":"published","published":"2020-03-06T20:15:12.707Z","modified":"2026-10-20T10:54:23.662174666Z","cvss":[{"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","level":"high"}],"updated_at":"2026-11-02T15:44:17.34531Z"},{"id":"DEBIAN-CVE-2020-7212","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).","status":"published","published":"2020-03-06T20:15:12.707Z","modified":"2026-10-26T12:02:15.935074333Z","cvss":[{"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","level":"high"}],"updated_at":"2026-11-02T15:45:34.311861Z"},{"id":"GHSA-hmv2-79q8-fv6g","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-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).","status":"published","published":"2021-04-30T17:31:43Z","modified":"2024-11-18T22:35:00.503678Z","cvss":[{"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","level":"high"},{"version":"4.0","score":8.7,"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","level":"high"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T15:46:49.28217Z"},{"id":"UBUNTU-CVE-2020-7212","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).","status":"withdrawn","published":"2020-03-06T20:15:00Z","modified":"2025-07-16T07:41:51.670949Z","cvss":[{"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","level":"high"}],"updated_at":"2026-11-02T15:54:25.728622Z"},{"id":"PYSEC-2020-149","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).","status":"published","published":"2020-03-06T20:15:00Z","modified":"2023-11-08T04:03:58.967412Z","updated_at":"2026-11-02T15:52:52.192131Z"},{"id":"ROOT-APP-PYPI-CVE-2020-7212","title":"CVE-2020-7212 in rootio-urllib3 - Patched by Root","description":"Root has patched CVE-2020-7212 in the rootio-urllib3 package for Root:PyPI. Multiple fixed versions available.","status":"published","published":"2026-06-03T19:05:13Z","modified":"2026-06-04T02:00:18.488100064Z","updated_at":"2026-11-02T15:53:27.940619Z"}]}}
