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 applicationsLearn about Authorization Bypass Through User-Controlled Key vulnerabilities in an interactive lesson.
Start learningUpgrade 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 Authorization Bypass Through User-Controlled Key in lib/mcp/server/transports/streamable_http_transport.rb, which processes tool execution requests to /messages/{session_id} without verifying that the requester owns the identified session. An attacker who obtains a valid session ID can execute unauthorized tool calls and modify state on a victim's session by sending POST requests to /messages/{session_id}, with the tool responses delivered to the victim's SSE stream. Exploitation requires the attacker to obtain a valid session ID out-of-band, such as through network observation or logs.