Skip to content

Security: Unbounded response body read can lead to memory exhaustion#560

Open
tuanaiseo wants to merge 2 commits intokurtmckee:mainfrom
tuanaiseo:contribai/fix/security/unbounded-response-body-read-can-lead-to
Open

Security: Unbounded response body read can lead to memory exhaustion#560
tuanaiseo wants to merge 2 commits intokurtmckee:mainfrom
tuanaiseo:contribai/fix/security/unbounded-response-body-read-can-lead-to

Conversation

@tuanaiseo
Copy link
Copy Markdown

Problem

The HTTP client reads the entire remote body into memory via response.content with no maximum size checks. A malicious endpoint can return a very large payload and cause excessive memory usage or process termination (DoS).

Severity: medium
File: feedparser/http.py

Solution

Use streamed reads (stream=True) with a strict maximum byte limit, abort when limit is exceeded, and propagate a controlled error state.

Changes

  • feedparser/http.py (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

tuanaiseo and others added 2 commits April 2, 2026 20:40
The HTTP client reads the entire remote body into memory via `response.content` with no maximum size checks. A malicious endpoint can return a very large payload and cause excessive memory usage or process termination (DoS).

Affected files: http.py

Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
@twm
Copy link
Copy Markdown
Contributor

twm commented Apr 11, 2026

@tuanaiseo Please stop with the slop PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants