NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · MCP Python SDK

CVE-2025-53366: MCP Python SDK vulnerability in the FastMCP Server causes validation error, leading to DoS

highCVSS 4.0 8.7GHSA-3qhf-m339-9g5v

CVE-2025-53366 is a denial of service in the MCP Python SDK (pip package mcp). A malformed request to a FastMCP server raises a validation error that is not handled, and the server returns 500 errors until someone restarts it. Versions before 1.9.4 are affected; upgrade to 1.9.4.

Published Jul 4, 2025 · Updated Jul 16, 2026 · Analysis Nov 1, 2026

What an attacker can do

A validation error in the SDK went unhandled when the server processed a malformed request. After that, the server kept answering with 500 errors until it was restarted by hand. Pull request 822 changed src/mcp/shared/session.py so that an exception is caught and turned into an error response for the single request that caused it, instead of breaking the session loop. The linked issue 820 gives a trigger: a tools/call request whose arguments field is a string instead of an object broke the server until restart.

An attacker needs network access to the server and nothing else, per the CVSS 4.0 vector: no privileges, no user interaction. One crafted request is enough, so the attack is cheap and repeatable. Impact is availability only. The advisory says the effect depends on the deployment and on infrastructure-level resilience, such as automatic restarts. For a team that exposes an MCP server to AI agents, a single bad tools/call can cut every agent off from its tools until an operator steps in. This entry has an EPSS score near the 95th percentile, higher than most MCP flaws of this kind.

Who is affected

The pip package mcp before 1.9.4, on servers built with FastMCP or the low-level server session that handles tools/call requests. Check the version:

pip show mcp

Check both direct installs and the lock files of projects that bundle an MCP server, since the SDK is usually an indirect dependency.

mcp

Ecosystem
PyPI
Affected
< 1.9.4
Fixed in
1.9.4
Check
pip show mcp

How to fix it

Upgrade to mcp 1.9.4:

pip install --upgrade "mcp>=1.9.4"

The fix is pull request 822 and the v1.9.4 release. No workaround is given in the advisory. Running the server under a supervisor that restarts it on failure limits the downtime; it does not stop the bug. Keep the endpoint off untrusted networks.

How to tell if you were hit

Look for runs of HTTP 500 responses from the MCP server that begin after a single tools/call request and do not clear until a restart. Server logs may show an unhandled pydantic validation error. Check for requests where the arguments field is a JSON string, not an object, from clients you do not know.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

A validation error in the MCP SDK can cause an unhandled exception when processing malformed requests, resulting in service unavailability (500 errors) until manually restarted. 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 mcp version fixes CVE-2025-53366?

1.9.4. Versions before it are vulnerable.

How is this different from CVE-2025-53365?

Both were reported by the same researcher and both cause denial of service. This one is a validation error on malformed requests, fixed in 1.9.4. The other is an uncaught ClosedResourceError in the streamable HTTP transport, fixed in 1.10.0.

Does the server recover on its own?

No. The advisory says it returns 500 errors until manually restarted, unless your infrastructure restarts it.

Is it exploited in the wild?

No source we read reports exploitation, and it is not in the CISA KEV catalog.

References

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 entries