Path to dependency file: /redline_hackathon_model/requirements.txt
Path to vulnerable library: /teSource-ArchiveExtractor_10185ad7-6719-45f4-abc0-7cff4f731fd5/20190531052439_2943/20190531052421_depth_0/numpy-1.16.2-cp27-cp27mu-manylinux1_x86_64/numpy/lib
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).
CVE-2020-7212 - High Severity Vulnerability
Vulnerable Library - urllib3-1.25.3-py2.py3-none-any.whl
HTTP library with thread-safe connection pooling, file post, and more.
Library home page: https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl
Path to dependency file: /redline_hackathon_model/requirements.txt
Path to vulnerable library: /teSource-ArchiveExtractor_10185ad7-6719-45f4-abc0-7cff4f731fd5/20190531052439_2943/20190531052421_depth_0/numpy-1.16.2-cp27-cp27mu-manylinux1_x86_64/numpy/lib
Dependency Hierarchy: - :x: **urllib3-1.25.3-py2.py3-none-any.whl** (Vulnerable Library)
Found in base branch: master
Vulnerability Details
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).
Publish Date: 2020-03-06
URL: CVE-2020-7212
CVSS 3 Score Details (7.5)
Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: None - Integrity Impact: None - Availability Impact: High
For more information on CVSS3 Scores, click here.Suggested Fix
Type: Upgrade version
Origin: https://github.com/advisories/GHSA-hmv2-79q8-fv6g
Release Date: 2020-03-09
Fix Resolution: 1.25.8
Step up your Open Source Security Game with Mend here