The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP).
CVE-2026-59951
Summary 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. 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: FastMCP (1.x) MCPServer and Server.streamablehttpapp() (2.x) StreamableHTTPSessionManager 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 statelesshttp=True (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 mcp 1.30.0 (1.x) or 2.2.0 (2.x) or later. In those versions: a session with no request in flight for…
Part of the AI stack
This affects Model Context Protocol, in MCP & tool servers.
Assessment
- CVSS
- 6.9 (v4.0)
- Severity
- Medium
- EPSS
- 0.46% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 14 October 2026
- Last updated
- 16 October 2026
- Affected
- modelcontextprotocol · python-sdk · mcp
- Weakness
- CWE-400, CWE-770, CWE-772
- Assigner
- security-advisories@github.com
CVSS vectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
At the source
References
- https://github.com/modelcontextprotocol/python-sdk/commit/92120b4b0f50385af096592d7cee932fc1d994e7
- https://github.com/modelcontextprotocol/python-sdk/commit/d2290ca3434731b68ea3e2270bc06a6e6575931b
- https://github.com/modelcontextprotocol/python-sdk/pull/3395
- https://github.com/modelcontextprotocol/python-sdk/pull/3426
- https://github.com/modelcontextprotocol/python-sdk/releases/tag/v1.30.0
- https://github.com/modelcontextprotocol/python-sdk/releases/tag/v2.2.0
- https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-84m7-p3x7-pcfv
- https://nvd.nist.gov/vuln/detail/CVE-2026-59951
- https://github.com/advisories/GHSA-84m7-p3x7-pcfv
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-59951