New GitHub issue #119451 from serhiy-storchaka:<br>
<hr>
<pre>
`http.client.HTTPResponse.read()` (without argument) consumes the amount of memory specified by the value of the `Content-Lenght` header in the response before starting receiving the data from the socket. Normally, if the server does not send enough data, the client gets `IncompleteRead` error, but if `Content-Lenght` is too large, it can consume a large amount of memory and CPU time and cause swapping. Therefore, a maleficent server can cause a DOS attack on client by sending a small response.
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/119451">View on GitHub</a>
<p>Labels: type-security, stdlib, 3.11, 3.10, 3.9, 3.8, topic-IO, 3.12, 3.13, 3.14</p>
<p>Assignee: </p>