Bump mcp from 0.8.0 to 0.9.2 (GHSA-qvqr-5cv7-wh35)#6933
Draft
Bump mcp from 0.8.0 to 0.9.2 (GHSA-qvqr-5cv7-wh35)#6933
Conversation
Agent-Logs-Url: https://github.com/rubyforgood/casa/sessions/d84d7bf4-877a-4d7a-8a63-7543f8392563 Co-authored-by: compwron <[email protected]>
Agent-Logs-Url: https://github.com/rubyforgood/casa/sessions/d84d7bf4-877a-4d7a-8a63-7543f8392563 Co-authored-by: compwron <[email protected]>
Copilot
AI
changed the title
[WIP] Fix session hijacking vulnerability in Ruby SDK
Bump mcp from 0.8.0 to 0.9.2 (GHSA-qvqr-5cv7-wh35)
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mcp0.8.0 allows SSE stream hijacking: a secondGETwith the same session ID silently overwrites the stored stream, redirecting all subsequent server-sent data to the attacker. Fixed in 0.9.2, which rejects duplicate SSE connections with HTTP 409.Changes
Gemfile.lock: bumpedmcp0.8.0 → 0.9.2. Both versions share the same single runtime dependency (json-schema >= 4.1), making this a clean version-only swap.Reachability
Not reachable.
mcpenters the dependency graph only as a transitive dep ofsimplecov-mcp(a test coverage formatter). No MCP server orStreamableHTTPTransportis instantiated anywhere in this codebase. This update clears the scanner rather than closing an active attack surface.Original prompt
This section details the Dependabot vulnerability alert you should resolve
<alert_title>MCP Ruby SDK: Insufficient Session Binding Allows SSE Stream Hijacking via Session ID Replay</alert_title>
<alert_description>### Summary
The Ruby SDK's streamable_http_transport.rb implementation contains a session hijacking vulnerability. An attacker who obtains a valid session ID can completely hijack the victim's Server-Sent Events (SSE) stream and intercept all real-time data.
Details
Root Cause
The StreamableHTTPTransport implementation stores only one SSE stream object per session ID and lacks:
PoC
Vulnerable Code
File: streamable_http_transport.rb - L336-L339:
Attack Scenario
Step 1: Legitimate Session Establishment
Step 2: Session ID Compromise
Step 3: Stream Hijacking
Step 4: Data Interception
Technical Details
The vulnerability happens:
Client 1 connects (GET request)
Client 2 connects with SAME session ID (Attack!)
Now when the server sends notifications:
Comparison: Python SDK Protection
The Python SDK prevents this vulnerability by rejecting duplicate SSE connections:
Refer: https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/streamable_http.py#L680-L685
When a duplicate connection attempt is detected, the Python SDK returns an HTTP 409 Conflict error, protecting the existing connection.
Recommended Mitigations
For SDK Maintainers
Steps To Reproduce:
Please find attached two python client files demonstrating the attack
Terminal 1:
ruby streamable_http_server.rbMakes 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:
python3 legitimate_client_ruby_server.pyWhat happens:
Terminal 3 (while the legitimate client is running):
python3 attacker_client_ruby_server.py <SESSION_ID>Replace
<SESSION_ID>with the ID from Terminal 2.What happens immediately:
Impact
While the absence of user binding may not pose immediate risks if session IDs are not used to store sensitive data or state, the fundamental purpose of session IDs is to maintain stateful connections. If the SDK or its consumers utilize session IDs for sensitive operations without proper user binding controls, this creates a potential security vulnerability. For example: In the case of the Ruby ...