CVE-2020-7212: High severity Python urllib3 vulnerability

Published Mar 6, 2020
·
Updated

The encodeinvalidchars 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 percentencodings array contains all matches of percent encodings. It is not deduplicated. For a URL of length N, the size of percentencodings 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 percentencodings were deduplicated, the time to compute encodeinvalidchars would be O(kN), where k is at most 484 ((10+62)^2).

Other sources

urllib3 is vulnerable to a denial of service, caused by a flaw in the encodeinvalidchars function in util/url.py. By sending a specially-crafted request, a remote attacker could exploit this vulnerability to cause a denial of service condition.

IBM

Affected Software

4 affected componentsFixes available
pip/urllib3>=1.25.2<=1.25.7
1.25.8
Python urllib3>=1.25.2<=1.25.7
IBM QRadar SIEM<=7.5 - 7.5.0 UP9 IF03
IBM QRadar Incident Forensics<=7.5 - 7.5.0 UP9 IF03

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/urllib3 to a version that resolves this vulnerability.

    Fixed in 1.25.8

Event History

Mar 6, 2020
CVE Published
via MITRE·07:14 PM
Data Sourced
via MITRE·07:14 PM
Description
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 30, 2021
Advisory Published
via GitHub·05:31 PM
Oct 17, 2024
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2020-7212?

CVE-2020-7212 is a vulnerability in the urllib3 library for Python that allows a denial of service (CPU consumption) due to an inefficient algorithm in the _encode_invalid_chars function.

2

How severe is CVE-2020-7212?

CVE-2020-7212 has a severity rating of 7.5 (high).

3

Which software is affected by CVE-2020-7212?

The urllib3 library versions 1.25.2 through 1.25.7 for Python are affected by CVE-2020-7212.

4

How can I fix CVE-2020-7212?

To fix CVE-2020-7212, upgrade to urllib3 version 1.25.8 or later.

5

Where can I find more information about CVE-2020-7212?

You can find more information about CVE-2020-7212 in the references provided: [link1], [link2], [link3].

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203