What happened
The MCP Kotlin SDK's shared ReadBuffer implementation lacks a bound on accumulated buffer size when appending received byte chunks, enabling a memory-exhaustion denial-of-service condition triggerable by any connected MCP peer.
Why it matters
As MCP adoption grows across languages, official SDK-level resource-exhaustion bugs can affect every application built on that SDK; this is a narrow-impact but precisely scoped flaw in the official Kotlin implementation of a rapidly-proliferating agent-tooling protocol.
Attack vector
ReadBuffer.append writes every received byte chunk without bounding total buffer size, allowing a malicious or misbehaving MCP peer to send an unbounded stream and exhaust memory on the receiving side, resulting in denial of service.
Affected systems
MCP Kotlin SDK (modelcontextprotocol/kotlin-sdk), versions 0.7.0 through 0.12.0
Mitigation
Upgrade to a patched MCP Kotlin SDK release once available; apply message-size limits at the transport layer as a interim mitigation.