INCIDENT MAP

Browse / MCP and Tool Server Flaws / CVE-2026-67431

MCP Ruby SDK: Ruby SSE Session Poisoning

CVE-2026-67431 ยท 2026-07-30 high

Class
MCP and Tool Server Flaws (filed by a model that read the advisory)
Technique
Authentication and access control
Affected
mcp (RubyGems)
CVSS
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
EPSS
0.4% chance of exploitation in 30 days

How it works, in short

The Ruby MCP transport accepts tool calls for any session ID without checking ownership, so a stolen ID runs tools as the victim. (Our summary, written by a model. The source text is below.)

Details

Summary

Vulnerability: Missing Session Ownership Validation in the Ruby MCP SDK's Streamable and SSE HTTP transport implementation. Any attacker with a stolen session ID can execute tools with the victim's session. This is a silent attack - the victim's session is compromised and being used for unauthorized actions, but it is hard to know for the victim

Details

https://github.com/modelcontextprotocol/ruby-sdk/blob/main/lib/mcp/server/transports/streamable_http_transport.rb#L260-L278

Victim starts a legitimate MCP session and receives session ID abc-123
Attacker obtains the session ID (various means - network sniffing, logs, etc. out of scope for this analysis)
Attacker sends POST to /messages/abc-123 with a tool call
Server accepts the request (no ownership validation!)
Server executes the tool and sends response to victim's SSE stream
Victim receives attacker's response, thinking it's legitimate

PoC

attacker_client.py legitimate_client.py

Prerequisites

Running the Demo

ruby streamable_http_server.rb

Makes use of https://github.com/modelcontextprotocol/ruby-sdk/blob/main/examples/streamable_http_server.rb
This server has a tool call notification_tool which the clients call

python3 legitimate_client.py

Copy the session ID from Terminal 1 and run:

python3 attacker_client.py abc-123-def-456

Impact

Additional Details

Session Hijacking Protection in MCP Implementations

The MCP specification recommends - "MCP servers SHOULD bind session IDs to user-specific information".

User Binding - Comparison other SDKs

csharp-sdk

Go-sdk

Comparison with the Stream Replacement vulnerability

Stream Replacement
https://github.com/modelcontextprotocol/ruby-sdk/security/advisories/GHSA-qvqr-5cv7-wh35

Session Poisoning

References

Source: GitHub Advisory Database, used under CC BY 4.0.