Resource Exhaustion Affecting python-urllib3 package, versions <1.25.8-1


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
3.37% (88th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-PYTHONURLLIB3-561571
  • published31 Mar 2020
  • disclosed6 Mar 2020

Introduced: 6 Mar 2020

CVE-2020-7212  (opens in a new tab)
CWE-400  (opens in a new tab)

How to fix?

Upgrade Debian:unstable python-urllib3 to version 1.25.8-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream python-urllib3 package and not the python-urllib3 package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

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 Base Scores

version 3.1