# CVE-2025-13836: Python http.client denial of service via large Content-Length header

Source: https://junglewise.ai/threats/cve-2025-13836-python-http-client-denial-of-service-via-large-content-length  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-12-01. Updated: 2026-05-18  
License: CC BY 4.0 with a link back

CVE-2025-13836 · Severity: high · CVSS 7.5 · Published 2025-12-01

A vulnerability in Python's standard HTTP client library could allow a malicious server to crash a Python-based application. By sending a specially crafted response header with an extremely large size value, the server can force the Python application to exhaust its available memory. This results in a denial-of-service (DoS) condition where the application stops functioning or the entire system becomes unresponsive.

## Quick answers

**Is CVE-2025-13836 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-13836 being exploited in the wild.

**How severe is CVE-2025-13836?** High severity, with a CVSS score of 7.5, published 1 December 2025.

**Which products and versions are affected?** Python Software Foundation Python up to (excluding) 3.10.20, 3.11.0 to (excluding) 3.11.15, 3.12.0 to (excluding) 3.12.13, 3.13.0 to (excluding) 3.13.11, 3.14.0, 3.15.0 alpha 1-2.

**Is there a fix for CVE-2025-13836?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2025-13836 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2025-13836?** Check whether anything you run is named in the advisory. 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.

## Technical details

A vulnerability exists in the `http.client.HTTPResponse.read()` method of Python's standard library. When the method is called without a specific read amount, it defaults to allocating memory based on the value provided in the 'Content-Length' HTTP header before actually receiving the data from the socket. A malicious server can exploit this by sending a response with an arbitrarily large Content-Length header, causing the client to attempt a massive memory allocation. This leads to uncontrolled resource consumption (CWE-400), resulting in an Out-of-Memory (OOM) error or system swapping, even if the server never sends the actual data. The issue has been addressed by modifying the client to read data in chunks rather than pre-allocating the entire length.

## Affected products

- Python Software Foundation Python up to (excluding) 3.10.20, 3.11.0 to (excluding) 3.11.15, 3.12.0 to (excluding) 3.12.13, 3.13.0 to (excluding) 3.13.11, 3.14.0, 3.15.0 alpha 1-2

## Timeline

- 2024-05-23: disclosed: Issue opened on GitHub repository
- 2025-12-01: advisory: CVE published and patches released

## References

- [https://github.com/python/cpython/commit/14b1fdb0a94b96f86fc7b86671ea9582b8676628](https://github.com/python/cpython/commit/14b1fdb0a94b96f86fc7b86671ea9582b8676628)
- [https://github.com/python/cpython/commit/289f29b0fe38baf2d7cb5854f4bb573cc34a6a15](https://github.com/python/cpython/commit/289f29b0fe38baf2d7cb5854f4bb573cc34a6a15)
- [https://github.com/python/cpython/commit/4ce27904b597c77d74dd93f2c912676021a99155](https://github.com/python/cpython/commit/4ce27904b597c77d74dd93f2c912676021a99155)
- [https://github.com/python/cpython/commit/5a4c4a033a4a54481be6870aa1896fad732555b5](https://github.com/python/cpython/commit/5a4c4a033a4a54481be6870aa1896fad732555b5)
- [https://github.com/python/cpython/commit/5dc101675fd22918facbbe0fecdc821502beaaf0](https://github.com/python/cpython/commit/5dc101675fd22918facbbe0fecdc821502beaaf0)
- [https://github.com/python/cpython/commit/afc40bdd3dd71f343fd9016f6d8eebbacbd6587c](https://github.com/python/cpython/commit/afc40bdd3dd71f343fd9016f6d8eebbacbd6587c)
- [https://github.com/python/cpython/issues/119451](https://github.com/python/cpython/issues/119451)
