MCP Ruby SDK: Potential DoS via Unbounded JSON-RPC Request
An unauthenticated remote attacker reportedly can cause denial of service in MCP Ruby SDK servers by sending an oversized JSON-RPC POST request. This affects servers using `MCP::Server::Transports::StreamableHTTPTransport`.
What happened
According to the advisory, the vulnerability arises from the `StreamableHTTPTransport` component, which reads the entire HTTP body into a Ruby `String` and parses it with `JSON.parse(body, symbolize_names: true)` without any size limit, `Content-Length` pre-check, or streaming parser. This allows an attacker to allocate gigabytes of memory in the worker process by sending a single oversized JSON-RPC POST request.
The vulnerability is under investigation and has been assigned the identifier GHSA-H669-8M4G-R2HC. The affected component is the `mcp-ruby-sdk` gem.
To assess your exposure, check if your systems utilize the `MCP::Server::Transports::StreamableHTTPTransport` component from the `mcp-ruby-sdk` gem. It is recommended to monitor for potential DoS attacks and consider mitigating the impact by implementing size limits or using a streaming parser for JSON-RPC requests. For more details, consult the primary source at https://github.com/modelcontextprotocol/ruby-sdk/security/advisories/GHSA-h669-8m4g-r2hc.
How 0Day mitigates this
mcp-ruby-sdk is anywhere in your dependency tree, the engineers who own the affected repositories get a push alert the moment it is flagged — no manual audit to remember to run.Read how this differs from waiting on a scanner to catch a known advisory, or see the exact, read-only access 0Day needs to do this for an organization.