Skip to content
MediumVulnerability

GHSA-84m7-p3x7-pcfv: MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion

Published
Record updated
View JSON
Affected
  • mcp >= 2.0.0, < 2.2.0, fixed in 2.2.0
  • mcp >= 1.8.0, < 1.30.0, fixed in 1.30.0
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.5%

Summary

The MCP Python SDK's Streamable HTTP transport in stateful mode, the default, never reclaimed session state in affected versions 1.8.0 through 1.29.1 and 2.0.0 through 2.1.1. Sessions did not expire, DELETE left entries registered, and refused sessions kept running tasks, so any client that could reach the endpoint could grow server memory without bound until a restart.

Mitigation

Upgrade to mcp 1.30.0 (1.x) or 2.2.0 (2.x) or later, which add session_idle_timeout (default 1800 seconds) and max_sessions (default 10000) and discard sessions as soon as they end. If you cannot upgrade yet, pass stateless_http=True (1.12.0 or later) where no per-session state is needed, or restrict who can reach the endpoint.