CVE-2026-59951mediumDenial of service2026-10-15
CVE-2026-59951: MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion
MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion.
What it is
In affected versions, a Streamable HTTP server in stateful mode (the default) never reclaimed session state:
In affected versions, a Streamable HTTP server in stateful mode (the default) never reclaimed session state:
- sessions did not expire; - a client DELETE ended the session but left its entry registered; - a session whose first request was refused stayed registered with a running task.
Each session also kept its parsed initialize parameters, and the number of sessions was unlimited. A client that could reach the endpoint could grow server memory without bound using ordinary short requests; only a restart reclaimed it.
How to check
- Affected: mcp (pip) >= 1.8.0, < 1.30.0.
- Affected: mcp (pip) >= 2.0.0, < 2.2.0.
- Compare your installed version with the range above (command below).
How to fix
- Upgrade mcp to 1.30.0 or later.
- Upgrade mcp to 2.2.0 or later.
pip show mcp | grep VersionSources
More advisories for this tool
- criticalCVE-2026-32871: FastMCP OpenAPI Provider has an SSRF & Path Traversal Vulnerability
- criticalCVE-2025-6514: mcp-remote exposed to OS command injection via untrusted MCP server connections
- criticalCVE-2025-49596: MCP Inspector proxy server lacks authentication between the Inspector client and proxy
- highCVE-2026-104850: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server