Denial of Service Vulnerability in Python httplib2 Package

python-httplib2 Updated 02 Oct 2025

Summary

08/02/2021
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2021-21240: httplib2 is a comprehensive HTTP client library for Python. Affects python-httplib2 versions < 0.20.2-1. Fixed in 0.20.2-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The httplib2 package is a comprehensive HTTP client library for Python that facilitates communication with web services. It supports various features such as caching, authentication, and redirects, making it a popular choice for developers. However, prior to version 0.19.0, the package was susceptible to a Denial of Service (DoS) vulnerability due to improper handling of specific server responses.

Vulnerability Detail

In httplib2 versions before 0.19.0, a malicious server could exploit the library by sending a long series of '\xa0' characters in the 'www-authenticate' header. This would lead to excessive CPU usage while the httplib2 client attempts to parse the header, resulting in a Denial of Service condition. The vulnerability stems from the library's inadequate implementation of authentication header parsing, which has been addressed in later versions.

How To Fix

Minimum fixed version

0.20.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-httplib2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate updating is not feasible, consider implementing a firewall rule to block requests from untrusted sources or limit the exposure of your application to potentially malicious servers.

Conclusion

The Denial of Service vulnerability in the httplib2 package poses a significant risk to applications using versions prior to 0.19.0. It is crucial to update to the patched version to mitigate this risk. Additionally, implementing temporary workarounds can help protect your application until an update can be performed.

See every vulnerability recorded for python-httplib2 →

Share this vulnerability

FAQ

The vulnerability allows a malicious server to cause excessive CPU usage in the httplib2 client, leading to a Denial of Service.

Versions prior to 0.19.0 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is impacted by this vulnerability without needing to sign up.

Consider implementing firewall rules to block requests from untrusted servers as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for python-httplib2.

How To Fix

Minimum fixed version

0.20.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-httplib2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback