Skip to content

[3.10] gh-119451: Fix a potential denial of service in http.client (GH-119454)#142142

Merged
pablogsal merged 2 commits into
python:3.10from
miss-islington:backport-5a4c4a0-3.10
Jan 25, 2026
Merged

[3.10] gh-119451: Fix a potential denial of service in http.client (GH-119454)#142142
pablogsal merged 2 commits into
python:3.10from
miss-islington:backport-5a4c4a0-3.10

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented Dec 1, 2025

Reading the whole body of the HTTP response could cause OOM if
the Content-Length value is too large even if the server does not send
a large amount of data. Now the HTTP client reads large data by chunks,
therefore the amount of consumed memory is proportional to the amount
of sent data.
(cherry picked from commit 5a4c4a0)

Co-authored-by: Serhiy Storchaka [email protected]

…thonGH-119454)

Reading the whole body of the HTTP response could cause OOM if
the Content-Length value is too large even if the server does not send
a large amount of data. Now the HTTP client reads large data by chunks,
therefore the amount of consumed memory is proportional to the amount
of sent data.
(cherry picked from commit 5a4c4a0)

Co-authored-by: Serhiy Storchaka <[email protected]>
@yiheng
Copy link
Copy Markdown

yiheng commented Jan 5, 2026

when will this pr be merged?

@pablogsal pablogsal merged commit 5dc1016 into python:3.10 Jan 25, 2026
15 checks passed
@miss-islington miss-islington deleted the backport-5a4c4a0-3.10 branch January 25, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

5 participants