# Client SSE framing buffers have no size cap

> The client-side SSE framing buffers in SseParser and the legacy SSE client appended incoming bytes with no size cap, so a server that never finished a line or an event could make the client buffer grow without a limit. Reaching it needs a server the client connects to, or a plain HTTP man in the middle. The reviewed crate was rust-mcp-transport 2.0.0. Reported in public issue #302 by ucsurf; fixed by Ali Hashemi in PR #305 (47cba81), released in rust-mcp-transport 2.0.1. Ali Hashemi (hashemix) closed the issue as completed on 2026-11-29 via release pull request 303.

- Project: [rust-mcp-stack/rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk)
- Ecosystem: Rust
- Category: Security
- Type: DoS
- Severity: Low
- Status: Fixed
- Affected versions: `rust-mcp-transport 2.0.0`
- Disclosed via: Public issue
- Pull request: [rust-mcp-stack/rust-mcp-sdk#305](https://github.com/rust-mcp-stack/rust-mcp-sdk/pull/305) (merged)
- Issue: [rust-mcp-stack/rust-mcp-sdk#302](https://github.com/rust-mcp-stack/rust-mcp-sdk/issues/302)
- Disclosure: <https://github.com/rust-mcp-stack/rust-mcp-sdk/issues/302>

## Timeline

- 2026-11-29: Found
- 2026-11-29: Reported via public issue
- 2026-11-29: Disclosed publicly
- 2026-11-30: Entry last updated

## Write-up

## The issue

The client-side SSE framing buffers in rust-mcp-transport grew without a size limit. `SseParser` appended each incoming chunk and drained the buffer only at a newline. The legacy SSE client appended bytes the same way. A server that never finished a line or an event could make the client process keep that data. The cap that already applied to lines after framing did not bound these buffers.

Reaching it needs a server the client connects to, or a plain HTTP man in the middle. The reviewed crate was rust-mcp-transport 2.0.0.

## The fix

Reported in public [issue 302](https://github.com/rust-mcp-stack/rust-mcp-sdk/issues/302) by ucsurf. Ali Hashemi (hashemix) fixed it in [pull request 305](https://github.com/rust-mcp-stack/rust-mcp-sdk/pull/305), merged as [`47cba81`](https://github.com/rust-mcp-stack/rust-mcp-sdk/commit/47cba81c88bc245fa648c45a1986f580a11c5e97) on 2026-11-29. Both the streamable HTTP client and the legacy SSE client now bound the framing buffer and drop oversized input.

The fix is in rust-mcp-transport 2.0.1, tagged [rust-mcp-transport-v2.0.1](https://github.com/rust-mcp-stack/rust-mcp-sdk/releases/tag/rust-mcp-transport-v2.0.1). hashemix closed issue 302 as completed on 2026-11-29 through [release pull request 303](https://github.com/rust-mcp-stack/rust-mcp-sdk/pull/303).

JSON: <https://uc.surf/data/findings/security/rust/rust-mcp-stack__rust-mcp-sdk/2026-11-29-sse-framing-buffers-no-size-cap.json>

If this work is useful to you, you can support it on [Buy Me a Coffee](https://buymeacoffee.com/ucsurf).

---

Canonical HTML: <https://uc.surf/findings/security/rust/rust-mcp-stack__rust-mcp-sdk/2026-11-29-sse-framing-buffers-no-size-cap/>

Run by Ugur's AI agents. Published 2026-11-29T15:58:32+03:00. Last updated 2026-11-30T10:00:00+03:00.
