CVE-2026-59951
The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP).
Published Oct 14, 2026 · corrected/updated Oct 15, 2026 · evidence confidence high
### Summary In affected versions, a Streamable HTTP server in stateful mode (the default) never reclaimed session state: - sessions did not expire; - a client 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 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. ### Am I affected? Yes, if you serve MCP over Streamable HTTP in stateful mode and clients you do not fully trust can reach the endpoint. Stateful mode is the default for: - (1.x) - and (2.x) - Affected versions: 1.8.0 through 1.29.1, and 2.0.0 through 2.1.1. Not affected: - servers on 1.12.0 or later passing (no sessions are kept) - servers using only the stdio or SSE transports Authentication limits who can open sessions, not how many a token holder can open. ### Fix Upgrade to 1.30.0 (1.x) or 2.2.0 (2.x) or later. In those versions: - a session with no request in flight for seconds (default 1800) is closed and its ID then answers ; open streams and in-progress requests keep it alive; - at most sessions exist at once (default 10000); a request that would open another is answered ; - a session is discarded as soon as it ends, whether by , expiry, or a refused opening request. Both settings are keyword arguments on (1.x), / (2.x) and ; disables them. This bounds retention rather than eliminating it: a live session still holds its parameters (up to roughly twice the 4 MiB body limit), and an with invalid parameters still opens a session that expires like any other. On a small host, lower , and to fit. If you cannot upgrade yet, pass (1.12.0 or later) where you need no per-session state, or restrict who can reach the endpoint.
Grounded briefings
Catalog interpretations for three audiences. Each brief cites ingested metadata and the original advisories below. They are not independent research and they do not invent exploit steps.
Executive
CVE-2026-59951 is a high public vulnerability record for this product. It is not currently listed in the CISA Known Exploited catalog. Check the linked vendor or CERT advisories for patch status. This summary is a catalog interpretation of the ingested metadata and cites the original advisories below.
System administrator
Identify whether this product is in your estate, then compare installed versions with the affected ranges. Affected packages or ranges on record: mcp (1.8.0 → 1.30.0); mcp (2.0.0 → 2.2.0); mcp. Check the linked vendor or CERT advisories for patch status. Prefer the vendor or distribution advisory linked in Sources before changing production systems. This is a catalog interpretation, not a runbook.
Security analyst
Signals on file: CVSS 7.5, EPSS 0.5%. It is not currently listed in the CISA Known Exploited catalog. Weakness classes: CWE-400, CWE-770, CWE-772. Sources contributing to this record: cve_org, epss, github, gitlab. Public exploit references, when present, are outbound links only and are not proof of active exploitation. This is a catalog interpretation of stored metadata.
Exploitation and remediation
Exploitation evidence
Not listed as known exploited in CISA KEV. Not in the CISA KEV catalog.
Patch and remediation
No required-action text is stored yet. Use the vendor or CERT links in Sources for patch availability.
Safe detection guidance
Compare installed versions with the affected ranges below and verify the advisory from the original publisher. This site stores metadata and outbound links only; it does not ship exploit code or proof-of-concept payloads.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Oct 14, 2026 · NIST NVD
Detected
The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). From 1.8.0 until 1.30.0 and 2.2.0, stateful Streamable HTTP servers, including FastMCP, MCPServer, Server.streamable_http_app(), and StreamableHTTPSessionManager, retain session entries without an idle expiration or aggregate session-count limit. DELETE, refused opening requests, and completed s
Oct 15, 2026 · NIST NVD
Updated
The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). From 1.8.0 until 1.30.0 and 2.2.0, stateful Streamable HTTP servers, including FastMCP, MCPServer, Server.streamable_http_app(), and StreamableHTTPSessionManager, retain session entries without an idle expiration or aggregate session-count limit. DELETE, refused opening requests, and completed s
Oct 15, 2026 · GitHub Advisory Database
Fix available
mcp fixed in 1.30.0; mcp fixed in 2.2.0
Oct 15, 2026 · GitHub Advisory Database
Fix available
mcp fixed in 1.30.0
Oct 15, 2026 · GitHub Advisory Database
Fix available
mcp fixed in 2.2.0
Oct 15, 2026 · GitHub Advisory Database
Updated
### Summary In affected versions, a Streamable HTTP server in stateful mode (the default) never reclaimed session state: - sessions did not expire; - a client 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 parameters, and the number of sessions was unlimited. A client that could r
Affected
- PyPI mcp1.8.0 → 1.30.0
- PyPI mcp2.0.0 → 2.2.0
- pypi mcpversion unspecified
Sources
- CVE.orgVulnerability recordCVE-2026-59951
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2026-59951
30-day exploitation probability 0.5%
first.org - GitHub Advisory DatabasePackage advisoryGHSA-84m7-p3x7-pcfv
GitHub Advisory Database record mirrored by OSV.
github.com - GitLab Advisory DatabasePackage advisoryCVE-2026-59951
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 r
advisories.gitlab.com - NIST NVDVulnerability recordCVE-2026-59951
The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). From 1.8.0 until 1.30.0 and 2.2.0, stateful Streamable HTTP servers, including FastMCP, MCPServer, Server.streamable_http_app(), and StreamableHTTPSessionManager, retain sessio
nvd.nist.gov - OSV.devPackage advisoryGHSA-84m7-p3x7-pcfv
MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion
osv.dev