Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade mcp to version 0.23.0 or higher.
mcp is a The official Ruby SDK for Model Context Protocol servers and clients
Affected versions of this package are vulnerable to DNS Rebinding in the handle_post method of MCP::Server::Transports::StreamableHTTPTransport in lib/mcp/server/transports/streamable_http_transport.rb, which processes JSON-RPC requests after checking Accept, Content-Type, Mcp-Session-Id, and protocol version but never reads HTTP_HOST or HTTP_ORIGIN. An attacker can drive a victim's locally running MCP server, invoke its exposed tools, and exfiltrate their output such as files, secrets, or command results by luring the victim to a webpage that rebinds its hostname to a loopback address and posts JSON-RPC requests with forged Host and Origin headers. Exploitation requires the victim to run the server on a reachable HTTP port over loopback or the LAN and to visit the attacker's page, and the impact depends on which tools the server exposes.