CVE-2021-21240 Regular Expression Denial of Service in httplib2

High 7.5 Published Updated

A malicious server can cause a denial of service in the httplib2 Python library by sending crafted authentication headers, requiring an upgrade to fix.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-21240?

CVE-2021-21240 is a high-severity denial of service vulnerability in httplib2, published on 8 Feb 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

httplib2 is a comprehensive HTTP client library for Python. In httplib2 before version 0.19.0, a malicious server which responds with long series of "\xa0" characters in the "www-authenticate" header may cause Denial of Service (CPU burn while parsing header) of the httplib2 client accessing said server. This is fixed in version 0.19.0 which contains a new implementation of auth headers parsing using the pyparsing library.

Weakness: CWE-400

Which versions are affected by CVE-2021-21240?

3 open source packages ship an affected version, including httplib2. It affects 1 product.

PackageAffectedFixed in
httplib2 PyPIAll versions0.19.0
httplib2 PyPIAll versions0.19.0
httplib2 PyPIAll versions0.19.0

Products include Httplib2 Project Httplib2.

How do I fix CVE-2021-21240?

Upgrade httplib2 to 0.19.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2021-21240 being exploited?

There is no known exploitation of CVE-2021-21240 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2021-21240, GHSA-93xj-8mrv-444m, MGASA-2021-0122, OESA-2021-1126, PYSEC-2021-16, UBUNTU-CVE-2021-21240.

Is CVE-2021-21240 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free