CVE-2026-59939: httplib2 Unbounded Decompression Denial of Service (CVSS 7.5)
httplib2, a widely-used Python HTTP client library, contains a flaw that allows attackers to crash applications using it. When an HTTP server returns a response with gzip or deflate compression, httplib2 decompresses the entire payload into memory without checking its final size. An attacker controlling the server (or intercepting traffic) can send a tiny compressed file that expands to gigabytes in memory, overwhelming the client and causing it to run out of memory. This affects all versions before 0.32.0.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-409
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-07-08 / 2026-07-13
NVD description (verbatim)
httplib2 is a comprehensive HTTP client library for Python. Prior to 0.32.0, httplib2 performs unbounded decompression of HTTP response bodies encoded with Content-Encoding: gzip or deflate in _decompressContent in httplib2/init.py, allowing a malicious or compromised HTTP server to return a small compressed payload that expands to an arbitrarily large size in memory and causes MemoryError or OOM-kill in the client process. This issue is fixed in version 0.32.0.
4 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in the _decompressContent function within httplib2/init.py. The library fails to validate decompressed content size, permitting zip bombs and deflate bombs—compressed payloads with extreme compression ratios that expand catastrophically when decompressed. An attacker-controlled HTTP server can exploit this by returning a small (kilobyte-range) response with Content-Encoding: gzip or deflate headers that decompresses to gigabytes. The absence of memory limits during decompression leads to MemoryError exceptions or kernel OOM-killer invocation, terminating the client process. This is classified as an Improper Resource Validation vulnerability (CWE-409).
Business impact
Any application using httplib2 to fetch content from untrusted or insufficiently validated HTTP endpoints faces denial-of-service risk. Services that use httplib2 internally—such as monitoring tools, API clients, or data ingestion pipelines—could be silently crashed by a malicious server response. In cloud or containerized environments, repeated OOM crashes may trigger billing spikes or SLA breaches due to pod/instance restarts. Organizations relying on httplib2 for third-party API integrations or web scraping are particularly exposed.
Affected systems
httplib2 versions prior to 0.32.0 are affected. This includes httplib2 0.31.0 and earlier. Check your Python environment with pip show httplib2 or equivalent package manager queries. Applications and microservices that directly import httplib2 or depend on libraries that use httplib2 transitively are in scope. Common use cases include REST API clients, OAuth consumers, and automation scripts.
Exploitability
Exploitability is straightforward and requires no authentication or user interaction. An attacker must either control the HTTP server being accessed or perform network interception (man-in-the-middle). The attack is passive from the client's perspective—simply fetching a crafted response triggers the vulnerability. No special client-side configuration or unusual request patterns are needed. However, real-world impact depends on application architecture; short-lived scripts may tolerate crashes, whereas long-running services suffer availability damage.
Remediation
Upgrade httplib2 to version 0.32.0 or later. For Python environments, run pip install --upgrade httplib2 or update your project's dependency lock file (requirements.txt, poetry.lock, etc.) and redeploy. Verify the upgraded version is in use across all deployment environments and container images. As a temporary mitigation, restrict HTTP requests to trusted servers only, validate server certificates rigorously, and implement network segmentation to reduce MITM risk; however, these do not fix the root cause.
Patch guidance
httplib2 0.32.0 introduces bounds checking for decompressed content, rejecting responses that exceed a reasonable size threshold. Consult the upstream release notes at the httplib2 project repository for specific memory limit values and any configuration options. When upgrading, test affected application components—particularly those that fetch large files or call external APIs—to ensure compatibility. No breaking API changes are documented for the 0.32.0 release.
Detection guidance
Monitor application logs for MemoryError exceptions, OOM-killer events, or unexpected process terminations correlating with HTTP GET/POST operations. Track the httplib2 version in use across your codebase via dependency scanning tools (SBOM, pip-audit, or supply chain tools). Inspect HTTP response headers in network logs for Content-Encoding: gzip or deflate, especially from untrusted origins. Endpoint detection and response (EDR) or application performance monitoring (APM) may surface abnormal memory spikes or sudden memory exhaustion in Python processes. Intrusion detection systems can flag compressed HTTP responses with anomalously low size-to-decompressed-size ratios, though this requires custom tuning.
Why prioritize this
This is a HIGH-severity denial-of-service vulnerability with a CVSS score of 7.5, reflecting high exploitability (network-accessible, no authentication or user interaction required) and significant availability impact (process crash). It is not a data breach vector (no confidentiality or integrity impact), so it falls below critical. However, it directly threatens service availability and is trivial to exploit remotely. Organizations should prioritize remediation alongside other high-severity issues. The absence of KEV (Known Exploited Vulnerabilities) listing does not lower priority; proof-of-concept code could emerge at any time.
Risk score, explained
CVSS 7.5 (HIGH) reflects AV:N (network-accessible attack vector), AC:L (low attack complexity—no special conditions), PR:N (no privileges required), UI:N (no user interaction), and A:H (high availability impact). The vector explicitly shows C:N and I:N, confirming confidentiality and integrity are not compromised. The score is driven entirely by denial-of-service potential. This is a solid B-tier vulnerability—not life-or-death, but material and easily actionable.
Frequently asked questions
Does this vulnerability leak data or allow code execution?
No. The vulnerability only causes memory exhaustion and process termination (denial of service). No confidentiality breach, integrity violation, or remote code execution is possible. An attacker cannot read files, exfiltrate credentials, or gain shell access.
What if my application only fetches from trusted internal servers?
Risk is significantly reduced, but not eliminated. If a trusted server is compromised, or if your network is vulnerable to man-in-the-middle attacks, an attacker can still exploit this. Upgrading remains the best practice. Additionally, supply-chain attacks (compromised dependencies of trusted services) are a realistic threat vector.
How do I check if my code is vulnerable?
Run pip show httplib2 to check your installed version. If it is 0.31.0 or earlier, you are vulnerable. Additionally, audit your code and dependency tree (using pip-audit, safety, or similar tools) to identify all places where httplib2 is imported or required. Direct imports and transitive dependencies both pose risk.
Are there any workarounds if I cannot upgrade immediately?
Upgrade is strongly recommended and is the only complete fix. Temporary mitigations include restricting HTTP requests to a whitelist of trusted servers, enforcing HTTPS with strict certificate validation to reduce MITM risk, and implementing request timeouts to limit exposure. However, these do not address the root cause and should not be considered substitutes for patching.
This explainer is provided for informational purposes and reflects publicly disclosed vulnerability data as of the publication and modification dates listed in the source CVE record. It does not constitute professional security advice. Organizations must verify all patch version numbers, KEV status, and remediation steps against official vendor advisories and their own security assessment processes. Consult your security team, incident response plan, and risk management framework before prioritizing remediation. This analysis assumes no advanced exploitation code is in active use; threat intelligence feeds and vendor advisories should be monitored for updates. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-10725HIGHProtocol::HTTP2 HTTP/2 Bomb Memory Exhaustion Vulnerability
- CVE-2026-24264HIGHNVIDIA Triton Inference Server Denial of Service Vulnerability
- CVE-2026-44160HIGHFluentd Gzip Decompression Denial of Service Vulnerability
- CVE-2026-44697HIGHKlever-Go Remote Denial-of-Service via Decompression Bomb
- CVE-2026-47774HIGHEnvoy HTTP/2 Memory Exhaustion Denial of Service
- CVE-2026-48044HIGHEnvoy Zstd Decompressor Memory Exhaustion DoS Vulnerability
- CVE-2026-48502HIGHMessagePack for C# Stack Overflow in Timestamp Parsing
- CVE-2026-48510HIGHMessagePack for C# LZ4 Decompression Memory Exhaustion DoS