RUSTSEC-2026-0462: Unbounded response body buffering in Streamable HTTP clients

Published Nov 5, 2026
·
Updated

Before 3.9.0, the built-in Streamable HTTP clients in rmcp read non-streaming HTTP response bodies into memory with no size limit. Both the reqwest client (transport-streamable-http-client-reqwest) and the Unix socket client (transport-streamable-http-client-unix-socket) were affected:

- application/json responses to POST requests were read in full before parsing. - Non-2xx responses were read in full for error reporting.

A malicious or compromised MCP server can answer with a body that never ends, for example a chunked application/json response that streams whitespace. The client buffers it until the process runs out of memory. This works during initialize, before any authentication. On desktop or agent hosts, this terminates the whole host application.

Server-sent event streams are not affected. Each event is already capped by maxsseeventsize, and events are not accumulated.

The flaw was corrected in 3.9.0. Successful JSON bodies are limited to 16 MiB and non-success bodies to 64 KiB. Bytes are counted while streaming, after decompression. An oversized Content-Length is rejected before the body is read, and an oversized body is rejected with StreamableHttpError::ResponseBodyTooLarge instead of being truncated.

If you cannot upgrade, use a custom StreamableHttpClient that enforces a response body limit, or connect only to trusted MCP servers.

Affected Software

1 affected componentFixes available
rust/rmcp>=0.2.0<3.9.0
3.9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rust/rmcp to a version that resolves this vulnerability.

    Fixed in 3.9.0
  2. Upgrade

    Upgrade rmcp to a version that resolves this vulnerability.

    Fixed in 3.9.0
  3. Compensating control

    If you cannot upgrade, use a custom StreamableHttpClient that enforces a response body limit.

  4. Compensating control

    On desktop or agent hosts, connect only to trusted MCP servers.

Event History

Nov 5, 2026
Advisory Published
via OSV·12:00 PM
Data Sourced
via OSV·12:00 PM
DescriptionSeverityAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203