CVE-2025-53365: MCP Python SDK has Unhandled Exception in Streamable HTTP Transport, Leading to Denial of Service
CVE-2025-53365 lets a remote client crash an MCP server built on the MCP Python SDK (pip package mcp) that uses the streamable HTTP transport. After opening a session, the client triggers an exception that surfaces as an uncaught ClosedResourceError and takes the server down until restart. Versions before 1.10.0 are affected; upgrade to 1.10.0.
Published Jul 4, 2025 · Updated Jul 16, 2026 · Analysis Nov 1, 2026
What an attacker can do
The streamable HTTP transport in the SDK did not catch every exception raised during a session. If a client deliberately causes one after the session is established, the server hits an uncaught ClosedResourceError and the process stops. The fix, pull request 967 titled "Fix uncaught exception in MCP server", adds exception catching. A linked issue in the same repository reports that FastMCP's streamable HTTP server also crashed on unsupported HTTP methods such as HEAD, PUT and DELETE, though the advisory does not say that is the same trigger.
The attacker needs only network access to the MCP endpoint. No authentication, user interaction or privileges are required by the CVSS 4.0 vector, and the result is availability loss only. The advisory notes the real impact depends on the deployment: a server behind a process supervisor that restarts it recovers quickly, while a bare process stays down. An MCP server that backs an AI assistant or agent workflow then goes dark until someone restarts it, and a client can repeat the crash on demand.
Who is affected
The pip package mcp, all versions before 1.10.0, when you run a server over the streamable HTTP transport. Servers that only use stdio are not reachable by remote clients in this way. Check the installed version:
pip show mcpAlso check lock files and container images, since the SDK is often pulled in by other packages that ship MCP servers.
mcp
- Ecosystem
- PyPI
- Affected
- < 1.10.0
- Fixed in
- 1.10.0
- Check
pip show mcp
How to fix it
Upgrade to mcp 1.10.0:
pip install --upgrade "mcp>=1.10.0"The fix is in pull request 967 and the v1.10.0 release. The advisory names no workaround beyond infrastructure-level resilience: run the server under a supervisor or orchestrator that restarts it, and do not expose the endpoint to untrusted networks.
How to tell if you were hit
Look in server logs for a traceback ending in anyio.ClosedResourceError followed by process exit, particularly right after a streamable HTTP session was opened. Repeated restarts of the MCP server process, or a container in a crash loop, with HTTP clients you do not recognise in the access log, point to this flaw.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
If a client deliberately triggers an exception after establishing a streamable HTTP session, this can lead to an uncaught ClosedResourceError on the server side, causing the server to crash and requiring a restart to restore service. Impact may vary depending on the deployment conditions, and presence of infrastructure-level resilience measures.
Thank you to Rich Harang for reporting this issue.
Credited to rharang.
Questions
- Which version of the MCP Python SDK fixes CVE-2025-53365?
mcp 1.10.0. Every earlier version is listed as vulnerable.
- Does this affect stdio MCP servers?
The advisory describes the streamable HTTP transport, where a remote client opens a session. A server used only over stdio has no such remote session.
- Does the attacker need to log in?
The CVSS 4.0 vector says no privileges and no user interaction. Any client that can reach the endpoint and open a session can trigger it, unless you put your own authentication in front.
- Can it lead to code execution?
No. The advisory describes a crash and denial of service only.
References
Read for this analysis:
- https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-j975-95f5-7wqh
- https://github.com/modelcontextprotocol/python-sdk/pull/967
- https://github.com/modelcontextprotocol/python-sdk/commit/7b420656de48cfdb90b39eb582e60b6d55c2f891
- https://github.com/modelcontextprotocol/python-sdk/releases/tag/v1.10.0
- https://nvd.nist.gov/vuln/detail/CVE-2025-53365
- https://github.com/advisories/GHSA-j975-95f5-7wqh
- https://github.com/modelcontextprotocol/python-sdk
- https://github.com/pypa/advisory-database/tree/main/vulns/mcp/PYSEC-2026-1618.yaml
- https://pypi.org/project/mcp
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More MCP Python SDK vulnerabilities
All MCP Python SDK entriesCVE-2026-116684
Model Context Protocol Python SDK: Server bearer-token authentication accepts tokens issued for a different resource server
medium6.8Oct 27, 2026CVE-2026-116685
Model Context Protocol Python SDK: HTTP client transports followed cross-origin redirects carrying custom headers and bodies
medium5.9Oct 27, 2026CVE-2026-116686
Model Context Protocol Python SDK: Client fetched server-chosen $ref URLs while validating tool results against output schemas
medium6.5Oct 27, 2026CVE-2026-59951
MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion
medium7.5Oct 15, 2026CVE-2026-52869
MCP Python SDK: HTTP transports serve session requests without verifying the authenticated principal
high7.1Jul 16, 2026CVE-2026-52870
MCP Python SDK: Experimental task handlers allow any client to access and cancel other clients' tasks
high7.6Jul 16, 2026
