# CVE-2026-67431: modelcontextprotocol ruby-sdk session hijacking in StreamableHTTPTransport

Source: https://junglewise.ai/threats/cve-2026-67431-modelcontextprotocol-ruby-sdk-session-hijacking-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-29. Updated: 2026-07-30  
License: CC BY 4.0 with a link back

CVE-2026-67431 · Severity: high · CVSS 4 · Published 2026-07-29

The Ruby SDK for the Model Context Protocol (MCP) contains a vulnerability where it fails to verify the ownership of active sessions. An attacker who obtains a valid session ID can send unauthorized commands to the server, causing the server to execute tools on behalf of the victim. This can lead to unauthorized data modification or state changes within the victim's session without their knowledge.

Technologies: [mcp (RubyGems)](https://junglewise.ai/threats/technologies/rubygems-mcp). Vendors: [Model Context Protocol](https://junglewise.ai/threats/vendors/model-context-protocol), [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2026-67431 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-67431 being exploited in the wild.

**How severe is CVE-2026-67431?** High severity, with a CVSS score of 4, published 29 July 2026.

**Which products and versions are affected?** mcp (RubyGems) ECOSYSTEM:introduced=0,fixed=0.23.0.

**Is there a fix for CVE-2026-67431?** Yes. mcp (RubyGems): upgrade to 0.23.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-67431 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-67431?** Check whether you run Model Context Protocol Ruby SDK or mcp (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- mcp (RubyGems): upgrade to 0.23.0 or later

  ```sh
  bundle update mcp
  ```


## Technical details

A session poisoning vulnerability exists in the `StreamableHttpTransport` and SSE implementation of the Ruby MCP SDK. The root cause is a lack of validation binding session IDs to specific users or connections. An attacker who obtains a victim's session ID can send POST requests to the `/messages/:session_id` endpoint to trigger tool executions. The server processes these requests and sends the resulting tool output to the victim's Server-Sent Events (SSE) stream, effectively hijacking the session's integrity. This issue is addressed in version 0.23.0 by implementing session ownership checks.

## Affected products

- Model Context Protocol (MCP) Ruby SDK mcp <= 0.22.0

## Identifiers

- CVE-2026-67431
- GHSA-5p9g-j988-pcwv

## Timeline

- 2026-07-08: disclosed: Initial report/publication on GitHub
- 2026-07-29: other: NVD publication
- 2026-07-30: patched: Version 0.23.0 released and advisory updated

## References

- [https://api.github.com/users/srikanthramu](https://api.github.com/users/srikanthramu)
- [https://github.com/srikanthramu](https://github.com/srikanthramu)
- [https://api.github.com/users/srikanthramu/gists%7B/gist_id%7D](https://api.github.com/users/srikanthramu/gists%7B/gist_id%7D)
- [https://api.github.com/users/srikanthramu/repos](https://api.github.com/users/srikanthramu/repos)
- [https://avatars.githubusercontent.com/u/8922182?v=4](https://avatars.githubusercontent.com/u/8922182?v=4)
- [https://api.github.com/users/srikanthramu/events%7B/privacy%7D](https://api.github.com/users/srikanthramu/events%7B/privacy%7D)

## Related threats

- [Model Context Protocol Ruby SDK memory exhaustion in StreamableHTTPTransport](https://junglewise.ai/threats/cve-2026-67432-model-context-protocol-ruby-sdk-memory-exhaustion-in)
- [Model Context Protocol Ruby SDK memory exhaustion in StreamableHTTPTransport](https://junglewise.ai/threats/cve-2026-67430-model-context-protocol-ruby-sdk-memory-exhaustion-in)
- [modelcontextprotocol ruby-sdk memory exhaustion in Stdio transports](https://junglewise.ai/threats/cve-2026-63119-modelcontextprotocol-ruby-sdk-memory-exhaustion-in-stdio)
- [modelcontextprotocol ruby-sdk DNS rebinding in StreamableHTTPTransport](https://junglewise.ai/threats/cve-2026-63118-modelcontextprotocol-ruby-sdk-dns-rebinding-in)
- [MCP Ruby SDK: Insufficient Session Binding Allows SSE Stream Hijacking via Session ID Replay](https://junglewise.ai/threats/cve-2026-33946-mcp-ruby-sdk-insufficient-session-binding-allows-sse-stream)
