PT-2020-5140 · Python+1 · Urllib3+1

Published

2020-03-06

·

Updated

2026-05-19

·

CVE-2020-7212

CVSS v4.0

8.7

High

VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions urllib3 library versions 1.25.2 through 1.25.7
Description The issue is related to an inefficient algorithm in the encode invalid chars function, which can lead to a denial of service due to CPU consumption. This happens because the percent encodings array is not deduplicated, resulting in a time complexity of O(N^2) for a URL of length N. If the array were deduplicated, the time complexity would be reduced to O(kN), where k is a constant. The vulnerability can be exploited by a remote attacker to cause a denial of service.
Recommendations For versions 1.25.2 through 1.25.7, consider updating to a version where the encode invalid chars function is optimized to deduplicate the percent encodings array, thus reducing the time complexity and mitigating the denial of service risk.

Fix

DoS

Resource Exhaustion

Weakness Enumeration

Related Identifiers

ALT-PU-2023-7180
BDU:2020-05736
CVE-2020-7212
GHSA-HMV2-79Q8-FV6G
PYSEC-2020-149

Affected Products

Alt Linux
Urllib3