CVE-2026-67431 — Vulnerability in mcp — CVE Details
MCP Ruby SDK: Ruby SSE Session Poisoning
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.48%). Schedule for your next planned update.
Does your project use an affected mcp version?
Paste your Gemfile.lock to check it for CVE-2026-67431 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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
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
- 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-456
- 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
Advisory Timeline
- First published July 30, 2026 (119 days ago).
- Last revised July 30, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install mcp -v 0.23.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| mcp RubyGems · Affected: 0.1.0, 0.10.0, 0.11.0, 0.12.0 (+21 more) | 0.23.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-284
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.6 score means for each attack dimension.
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
References
- https://github.com/modelcontextprotocol/ruby-sdk/security/advisories/GHSA-5p9g-j988-pcwvWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-67431ADVISORY
- https://github.com/modelcontextprotocol/ruby-sdk/commit/35466605319a34e4c7808712ae9bb1ca1afb2356WEB
- https://github.com/modelcontextprotocol/ruby-sdkPACKAGE
- https://github.com/modelcontextprotocol/ruby-sdk/releases/tag/v0.23.0WEB
Frequently Asked Questions
- What is CVE-2026-67431?
- MCP Ruby SDK: Ruby SSE Session Poisoning. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.6/10).
- How do I check if my project is affected by CVE-2026-67431?
- CVE-2026-67431 affects mcp. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-67431 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 33.9% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-126366HIGH
msgpack-ruby JRuby decoder makes uncapped header-count allocations; a 5-byte message forces multi-GiB OOM
- CVE-2026-67432HIGH
MCP Ruby SDK: Unbounded JSON-RPC request body causes uncontrolled memory allocation in StreamableHTTPTransport
- CVE-2026-33946HIGH
MCP Ruby SDK: Insufficient Session Binding Allows SSE Stream Hijacking via Session ID Replay
- CVE-2026-126081HIGH
Action Pack: Possible Strong Parameters Bypass in Parameters#each_key
- CVE-2026-67430MEDIUM
MCP Ruby SDK: Unbounded session retention in StreamableHTTPTransport allows memory exhaustion via initialize flood
- CVE-2026-63119MEDIUM
MCP Ruby SDK: Unbounded line buffer in stdio transports leads to memory exhaustion (DoS)
- CVE-2026-63118MEDIUM
MCP Ruby SDK: Streamable HTTP transport lacks DNS-rebinding (Host/Origin) protection