Loading advisory.
Loading advisory.
MCP Ruby SDK: Ruby SSE Session Poisoning
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.
Published 2026-07-29 19:15 UTC · Modified 2026-07-30 15:00 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| mcp | RubyGems | < 0.23.0 versions 0.1.0, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 0.19.0, 0.2.0, 0.20.0, 0.21.0, 0.22.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0 and 5 more | 0.23.0 | gem install mcp -v 0.23.0 |
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
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
attacker_client.py legitimate_client.py
Prerequisites
Python 3.8+
Install dependencies: requests
Running the Demo
Terminal 1: Start the Ruby MCP Server
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
Terminal 2: Start Victim Client
python3 legitimate_client.py
Terminal 3 - Attacker Client:
Copy the session ID from Terminal 1 and run:
python3 attacker_client.py abc-123-def-456Back to Terminal 2 - Victim sees the injected response:
Integrity: HIGH - Attacker can execute unauthorized tools and modify state
Availability: LOW - Attacker can disrupt victim's session with injected responses
Session Hijacking Protection in MCP Implementations
The MCP specification recommends - "MCP servers SHOULD bind session IDs to user-specific information".
csharp-sdk
https://github.com/modelcontextprotocol/csharp-sdk/blob/main/src/ModelContextProtocol.AspNetCore/SseHandler.cs#L36
https://github.com/modelcontextprotocol/csharp-sdk/blob/main/src/ModelContextProtocol.AspNetCore/SseHandler.cs#L95-L98
Go-sdk
https://github.com/modelcontextprotocol/go-sdk/blob/main/mcp/streamable.go#L66
https://github.com/modelcontextprotocol/go-sdk/blob/main/mcp/streamable.go#L316-L320
Stream Replacement https://github.com/modelcontextprotocol/ruby-sdk/security/advisories/GHSA-qvqr-5cv7-wh35
Target: SSE stream connection
Attack Vector: GET /mcp
What happens to Victim: The connection is disconnected and doesn't receive reponses
Session Poisoning
Target: Tool execution
Attack Vector: POST /mcp
What happens to Victim: The connection stays connected and receives responses of tool calls by attacker
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.004 on 2026-11-24 to 0.005 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.004 | first score | v2026.06.15 |
| 2026-11-26 | 0.005 | 0.004 | v2026.06.15 |