UTC
Medium

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
What it is

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). …

What to do

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.

Affected
PackageRegistryAffectedFixed in
io.modelcontextprotocol:kotlin-sdkMaven<= 0.12.00.13.0
io.modelcontextprotocol:kotlin-sdk-clientMaven>= 0.7.0, <= 0.12.00.13.0
io.modelcontextprotocol:kotlin-sdk-coreMaven<= 0.12.00.13.0
io.modelcontextprotocol:kotlin-sdk-serverMaven>= 0.7.0, <= 0.12.00.13.0
Also in io.modelcontextprotocol:kotlin-sdk, io.modelcontextprotocol:kotlin-sdk-client, io.modelcontextprotocol:kotlin-sdk-core, io.modelcontextprotocol:kotlin-sdk-server
  1. HighUnauthenticated Remote Denial of Service in MCP Kotlin SDK Streamable HTTP transport (request body size limit bypass)io.modelcontextprotocol:kotlin-sdk
  2. 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.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by the MCP reference servers project (https://github.com/modelcontextprotocol/servers/security/advisories); advisories published by the MCP Inspector project (https://github.com/modelcontextprotocol/inspector/security/advisories); advisories published by the MCP TypeScript SDK project (https://github.com/modelcontextprotocol/typescript-sdk/security/advisories); advisories published by the MCP Go SDK project (https://github.com/modelcontextprotocol/go-sdk/security/advisories); advisories published by the MCP Java SDK project (https://github.com/modelcontextprotocol/java-sdk/security/advisories); advisories published by the MCP Kotlin SDK project (https://github.com/modelcontextprotocol/kotlin-sdk/security/advisories); advisories published by the MCP Rust SDK project (https://github.com/modelcontextprotocol/rust-sdk/security/advisories); advisories published by the MCP Ruby SDK project (https://github.com/modelcontextprotocol/ruby-sdk/security/advisories); advisories published by the MCP C# SDK project (https://github.com/modelcontextprotocol/csharp-sdk/security/advisories); advisories published by the MCP PHP SDK project (https://github.com/modelcontextprotocol/php-sdk/security/advisories); advisories published by the MCP Registry project (https://github.com/modelcontextprotocol/registry/security/advisories); advisories published by Open Terminal (https://github.com/open-webui/open-terminal/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-12-06. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].