Unbounded line buffer in StdioServerTransport/StdioClientTransport leads to memory exhaustion (DoS)
CVE-2026-53937 · GHSA-74gp-qhv5-v493 · published 2026-06-02 · updated 2026-06-18
- Severity
- Medium
- CVSS score
- 6.2
- Chance of exploitation (EPSS)
- Not scored
- Fixed in
- 0.13.0
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
Denial of service via memory exhaustion. An attacker who controls the bytes delivered to the stdio transport can grow the server's address space until the JVM throws OutOfMemoryError or the host OOM-killer terminates the process. Affects any deployment in which a kotlin-sdk MCP server's stdin (or a client's child-process stdout when wrapped through StdioClientTransport) is sourced from an untrusted producer. Common shapes: Host that exec's the kotlin MCP server as a subprocess and pipes through bytes received from an upstream agent or network endpoint. Containerized/wrapped MCP server fronted by a transport adapter (e.g., HTTP-to-stdio bridge). …
Upgrade io.modelcontextprotocol:kotlin-sdk to 0.13.0 or later, and io.modelcontextprotocol:kotlin-sdk-client to 0.13.0 or later, and io.modelcontextprotocol:kotlin-sdk-core to 0.13.0 or later, and io.modelcontextprotocol:kotlin-sdk-server to 0.13.0 or later.
Apply a configurable maximum size cap on the unframed Buffer in ReadBuffer, default at a sane value (16 MiB is large enough for any realistic JSON-RPC frame), and throw a typed exception when the cap is crossed before a newline is seen. Have StdioServerTransport and StdioClientTransport catch the exception, surface it via the existing error callback, and close the transport. A non-positive cap should disable the check (preserves opt-out for callers that genuinely need it). The default value protects every existing caller without requiring an API migration. The same shape (maxFrameSize / maxBufferSize) has been adopted by other SDKs in this ecosystem.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| io.modelcontextprotocol:kotlin-sdk | Maven | <= 0.12.0 | 0.13.0 |
| io.modelcontextprotocol:kotlin-sdk-client | Maven | >= 0.7.0, <= 0.12.0 | 0.13.0 |
| io.modelcontextprotocol:kotlin-sdk-core | Maven | <= 0.12.0 | 0.13.0 |
| io.modelcontextprotocol:kotlin-sdk-server | Maven | >= 0.7.0, <= 0.12.0 | 0.13.0 |
- HightsParticles: Unbounded HTTP Request Body Buffering in @tsparticles/mcp-server Leads to Remote DoS@tsparticles/mcp-server
- HighMissing request-wide media budget allows single-request frontend resource exhaustionvllm
- HighMCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length@modelcontextprotocol/hono, @modelcontextprotocol/node, @modelcontextprotocol/sdk, @modelcontextprotocol/server
- HighvLLM : DoS via unvalidated mm_processor_kwargs in multimodal image processors (Isaac, InternVL, H2OVL, etc.)vllm
- HighUnbounded session retention in the Streamable HTTP transport allows an initialize flood DoSio.modelcontextprotocol.sdk:mcp-core
- HighUnauthenticated unbounded tool_schemas cache growth in rmcp Streamable HTTP server transport leads to remote denial-of-servicermcp
- HighUnauthenticated Remote Denial of Service in MCP Kotlin SDK Streamable HTTP transport (request body size limit bypass)io.modelcontextprotocol:kotlin-sdk
- MediumUnbounded memory growth in `StreamableHttpClientTransport` when parsing inline Server-Sent Events on HTTP POST responsesio.modelcontextprotocol:kotlin-sdk-client
The impact, patch and workaround text comes from the advisory, shortened (published by the MCP Kotlin SDK project). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.