|
| 1 | +--- |
| 2 | +layout: advisory |
| 3 | +title: 'CVE-2026-33946 (mcp): MCP Ruby SDK - Insufficient Session Binding Allows SSE |
| 4 | + Stream Hijacking via Session ID Replay' |
| 5 | +comments: false |
| 6 | +categories: |
| 7 | +- mcp |
| 8 | +advisory: |
| 9 | + gem: mcp |
| 10 | + cve: 2026-33946 |
| 11 | + ghsa: qvqr-5cv7-wh35 |
| 12 | + url: https://github.com/modelcontextprotocol/ruby-sdk/security/advisories/GHSA-qvqr-5cv7-wh35 |
| 13 | + title: MCP Ruby SDK - Insufficient Session Binding Allows SSE Stream Hijacking via |
| 14 | + Session ID Replay |
| 15 | + date: 2026-03-27 |
| 16 | + description: | |
| 17 | + ### Summary |
| 18 | +
|
| 19 | + The Ruby SDK's [streamable_http_transport.rb](https://github.com/modelcontextprotocol/ruby-sdk/blob/main/lib/mcp/server/transports/streamable_http_transport.rb) |
| 20 | + implementation contains a session hijacking vulnerability. An attacker |
| 21 | + who obtains a valid session ID can completely hijack the victim's |
| 22 | + Server-Sent Events (SSE) stream and intercept all real-time data. |
| 23 | +
|
| 24 | + ### Details |
| 25 | +
|
| 26 | + **Root Cause** |
| 27 | +
|
| 28 | + The StreamableHTTPTransport implementation stores only one SSE stream |
| 29 | + object per session ID and lacks: |
| 30 | +
|
| 31 | + - Session-to-user identity binding |
| 32 | + - Ownership validation when establishing SSE connections |
| 33 | + - Protection against multiple simultaneous connections to the same session |
| 34 | +
|
| 35 | + ### Impact |
| 36 | +
|
| 37 | + While the absence of user binding may not pose immediate risks if |
| 38 | + session IDs are not used to store sensitive data or state, the |
| 39 | + fundamental purpose of session IDs is to maintain stateful connections. |
| 40 | + If the SDK or its consumers utilize session IDs for sensitive operations |
| 41 | + without proper user binding controls, this creates a potential security |
| 42 | + vulnerability. For example: In the case of the Ruby SDK, the attacker |
| 43 | + was able to hijack the stream and receive all the tool responses |
| 44 | + belonging to the victim. The tool responses can be sensitive |
| 45 | + confidential data. |
| 46 | + cvss_v3: 8.2 |
| 47 | + patched_versions: |
| 48 | + - ">= 0.9.2" |
| 49 | + related: |
| 50 | + url: |
| 51 | + - https://www.cve.org/CVERecord?id=CVE-2026-33946 |
| 52 | + - https://github.com/modelcontextprotocol/ruby-sdk/releases/tag/v0.9.2 |
| 53 | + - https://github.com/modelcontextprotocol/ruby-sdk/security/advisories/GHSA-qvqr-5cv7-wh35 |
| 54 | + - https://github.com/modelcontextprotocol/ruby-sdk/blob/main/examples/streamable_http_server.rb |
| 55 | + - https://github.com/modelcontextprotocol/ruby-sdk/commit/db40143402d65b4fb6923cec42d2d72cb89b3874 |
| 56 | + - https://hackerone.com/reports/3556146 |
| 57 | + - https://github.com/modelcontextprotocol/csharp-sdk/blob/main/src/ModelContextProtocol.AspNetCore/SseHandler.cs#L93-L97 |
| 58 | + - https://github.com/modelcontextprotocol/go-sdk/blob/main/mcp/streamable.go#L281C1-L288C2 |
| 59 | + - https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/streamable_http.py#L680-L685 |
| 60 | + - https://github.com/advisories/GHSA-qvqr-5cv7-wh35 |
| 61 | +--- |
0 commit comments