BIT-python-min-2025-13836: Excessive read buffering DoS in http.client
When reading an HTTP response from a server, if no read amount is specified, the default behavior will be to use Content-Length. This allows a malicious server to cause the client to read large amounts of data into memory, potentially causing OOM or other DoS.
Affected Software
Event History
Frequently Asked Questions
Which applications are exposed?
Applications using Python's http.client to read HTTP responses without specifying a read amount are exposed when they communicate with a malicious or untrusted server.
What does an attacker need to exploit this?
An attacker needs to control or act as the HTTP server responding to the client. They can provide a large Content-Length value, causing the client to buffer a large amount of response data in memory.
How can I identify potentially affected code?
Review http.client response-handling code for reads performed without an explicit amount. Those reads use Content-Length by default and can consume excessive memory when the server supplies a large value.