Skip to content

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 20, 2026

Description

This PR addresses a potential DoS vulnerability where the HTTP client reads the response body without any size limits. This could allow a malicious server to exhaust memory by sending an unlimited amount of data.

Changes

  • Added a 10MB limit to the response body reading in src/server/client.rs using reader.take(10 * 1024 * 1024).

Verification

  • Created a reproduction test case that simulates a malicious server sending >20MB of data.
  • Verified that the client now limits the read operation and does not consume unlimited memory.
  • Ran existing tests to ensure no regressions.

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