CVE-2021-21240: Regular Expression Denial of Service (REDoS) in httplib2

CVE-2021-21240 · Severity: low · CVSS 3.1 · Published 2021-02-08

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.

Technologies: httplib2 (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2021-21240 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2021-21240 being exploited in the wild.
How severe is CVE-2021-21240?
Low severity, with a CVSS score of 3.1, published 8 February 2021.
Which products and versions are affected?
httplib2 (PyPI) ECOSYSTEM:introduced=0,fixed=0.19.0, GIT:introduced=0,fixed=bd9ee252c8f099608019709e22c0d705e98d26bc|ECOSYSTEM:introduced=0,fixed=0.19.0.
Is there a fix for CVE-2021-21240?
Yes. httplib2 (PyPI): upgrade to 0.19.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2021-21240?
Check whether you run httplib2 (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • httplib2 (PyPI): upgrade to 0.19.0 or later
    pip install "httplib2>=0.19.0"

Affected products

  • httplib2 (PyPI) ECOSYSTEM:introduced=0,fixed=0.19.0, GIT:introduced=0,fixed=bd9ee252c8f099608019709e22c0d705e98d26bc|ECOSYSTEM:introduced=0,fixed=0.19.0

Identifiers

  • CVE-2021-21240
  • GHSA-93xj-8mrv-444m
  • PYSEC-2021-16

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.