← All advisories

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.

01.

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.

02.

How to check

  1. Affected: mcp (pip) >= 1.8.0, < 1.30.0.
  2. Affected: mcp (pip) >= 2.0.0, < 2.2.0.
  3. Compare your installed version with the range above (command below).
03.

How to fix

  1. Upgrade mcp to 1.30.0 or later.
  2. Upgrade mcp to 2.2.0 or later.
pip show mcp | grep Version
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.