Skip to main content
No exploitation reportedFix available

CVE-2021-21240

No exploitation reported by the sources we read.

  • Published2021-02-08
  • Fixed in0.19.0
  • WeaknessCWE-400

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2021-02-0820:15CVE publishedNVD

Versions per branch

NVD · OSV
Httplib2 project httplib2
BranchAffectedFixed in
0.19< 0.19.00.19.0

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • py3-httplib2CleanStartall versions · fixed in 0.19.0-r0and 1 other package
  • py3-httplib2Alpine:v3.25all versions · fixed in 0.19.0-r0
  • py3-httplib2Alpine:v3.24all versions · fixed in 0.19.0-r0
  • py3-httplib2Alpine:v3.23all versions · fixed in 0.19.0-r0
  • py3-httplib2Alpine:v3.22all versions · fixed in 0.19.0-r0
  • py3-httplib2Alpine:v3.21all versions · fixed in 0.19.0-r0
  • py3-httplib2Alpine:v3.20all versions · fixed in 0.19.0-r0
  • py3-httplib2Alpine:v3.19all versions · fixed in 0.19.0-r0

36 more package ranges on OSV.dev

Vendor advisories

  • CVE-2021-21240 Red Hat Product Security2 products fixed · 50 known affected

    python-httplib2: Regular expression denial of service via malicious header

    python-httplib2.src as a component of Red Hat Ceph Storage 2 · fence-agents-aliyun as a component of Red Hat Enterprise Linux 7 · fence-agents-all as a component of Red Hat Enterprise Linux 7 · +47 more

  • RHSA-2021:2116 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: Red Hat OpenStack Platform 16.1.6 (python-httplib2) security update

Full record on NVD

Fix

  1. Update Httplib2 project httplib2 to 0.19.0
  2. Vendor fix Red Hat Product Security RHSA-2021:2116 · 2 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  3. Workaround from the vendor Red Hat Product Security RHSA-2021:2116 · 2 productsUse strict mode to parse WWW-Authenticate headers. This can be done by setting `httplib2.USE_WWW_AUTH_STRICT_PARSING = True`. Please note, however, that strict mode might lead to bad results in case of ill-formed header values.
  4. No fix available, says the vendor Red Hat Product Security CVE-2021-21240 · 3 productsFix deferred
  5. No fix planned, says the vendor Red Hat Product Security CVE-2021-21240 · 46 productsOut of support scope
  6. No fix planned, says the vendor Red Hat Product Security CVE-2021-21240 · 1 productWill not fix

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CNACVSS 3.17.5known since 2026-10-23
  • NVDCVSS 3.17.5read 2026-10-23
  • NVDCVSS 2.05read 2026-10-23
  • CNAweakness (CWE)CWE-400known since 2026-10-23
  • FIRST EPSSEPSS score3.7 %2026-12-04
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHigh2021-02-08

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published
2021-02-08
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-93xj-8mrv-444m

Frequently asked questions

What is CVE-2021-21240?

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.

Is CVE-2021-21240 actively exploited?

Active exploitation of CVE-2021-21240 has not been confirmed. Its EPSS score was 3.7% on 2026-12-04, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-21240?

CVE-2021-21240 has a CVSS v3 base score of 7.5 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.

Running httplib2? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record