CVE-2026-67431: MCP Ruby SDK: Ruby SSE Session Poisoning

Published Jul 29, 2026
·
Updated

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/streamablehttptransport.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 attackerclient.py legitimateclient.py

Prerequisites

1. Python 3.8+ 2. Install dependencies: requests

Running the Demo

1. Terminal 1: Start the Ruby MCP Server

ruby streamablehttpserver.rb

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

2. Terminal 2: Start Victim Client

python3 legitimateclient.py

3. Terminal 3 - Attacker Client:

Copy the session ID from Terminal 1 and run:

bash python3 attackerclient.py abc-123-def-456 4. Back to Terminal 2 - Victim sees the injected response:

Impact

- Integrity: HIGH - Attacker can execute unauthorized tools and modify state - Availability: LOW - Attacker can disrupt victim's session with injected responses

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

- 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

Comparison with the Stream Replacement vulnerability

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

Other sources

MCP Ruby SDK is the official Ruby SDK for Model Context Protocol servers and clients. Prior to 0.23.0, MCP::Server::Transports::StreamableHTTPTransport in the mcp gem does not bind a session ID to a session owner, allowing an attacker with a stolen session ID to send tools/call requests that execute in the victim's session. This issue is fixed in version 0.23.0.

— MITRE

Affected Software

2 affected componentsFixes available
modelcontextprotocol MCP Ruby SDK<0.23.0
rubygems/mcp<=0.22.0
0.23.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/mcp to a version that resolves this vulnerability.

    Fixed in 0.23.0
  2. Upgrade

    Upgrade mcp gem (MCP Ruby SDK) / MCP::Server::Transports::StreamableHTTPTransport to a version that resolves this vulnerability.

    Fixed in 0.23.0Patch GHSA-qvqr-5cv7-wh35
  3. Compensating control

    Ensure the MCP server binds session IDs to user-specific information (per MCP security best practice: “MCP servers SHOULD bind session IDs to user-specific information”).

Event History

Jul 29, 2026
CVE Published
via MITRE·07:15 PM
Data Sourced
via MITRE·07:15 PM
DescriptionWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness
Jul 30, 2026
Advisory Published
via GitHub·02:44 PM
Data Sourced
via GitHub·02:44 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-67431?

The severity of CVE-2026-67431 is rated at 55.

2

How do I fix CVE-2026-67431?

To fix CVE-2026-67431, update to the MCP Ruby SDK version 0.23.0 or later.

3

What issue does CVE-2026-67431 present?

CVE-2026-67431 presents a vulnerability where an attacker can exploit session IDs to send unauthorized requests.

4

What systems are affected by CVE-2026-67431?

CVE-2026-67431 affects all versions of the MCP Ruby SDK prior to 0.23.0.

5

What component is specifically vulnerable in CVE-2026-67431?

The vulnerability in CVE-2026-67431 is found in MCP::Server::Transports::StreamableHTTPTransport.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203