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-96620: Claude Agent SDK (Python) resume option lets attackers run commands
- criticalCVE-2026-95182: DeepSeek Harness can be tricked into running a planted fake npx
- criticalLangflow: adding an MCP server runs any command on the host (CVE-2026-105697, CVE-2026-105740)
- criticalCVE-2026-32871: FastMCP OpenAPI Provider has an SSRF & Path Traversal Vulnerability