REDHAT-BUG-2552745: High severity pypi/mcp vulnerability
The Model Context Protocol Python SDK is the official Python SDK for Model Context Protocol servers and clients. In mcp versions before 1.29.1 and from 2.0.0a1 through 2.0.1, the Streamable HTTP session manager, SSE message endpoint, and OAuth authorization-server routes buffer complete HTTP request bodies without enforcing a maximum size. An unauthenticated remote client able to reach an affected endpoint can send a large declared or streamed request body that consumes multiple times the body size in process memory and can repeatedly exhaust memory or terminate the server. Stdio-only servers and deployments with an effective upstream request-size limit are not affected, and applications that use StreamableHTTPServerTransport directly remain responsible for enforcing their own limit. The standard SDK server applications and session managers are fixed in versions 1.29.1 and 2.1.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.29.1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.1.0
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Servers using affected MCP SDK versions with reachable Streamable HTTP session-manager, SSE message, or OAuth authorization-server routes are exposed. Stdio-only servers and deployments protected by an effective upstream HTTP request-size limit are not affected.
Does an attacker need authentication or special access?
No. An unauthenticated remote client can exploit the issue if it can reach an affected endpoint.
What can an attacker do?
An attacker can submit a large declared or streamed HTTP request body, causing the process to consume multiple times the request-body size in memory. Repeated requests can exhaust memory or terminate the server.
What should be done if upgrading cannot happen immediately?
Enforce an effective HTTP request-body size limit in an upstream component before requests reach the affected endpoints. Applications using StreamableHTTPServerTransport directly must enforce their own request-size limit.
Which versions contain fixes?
The standard SDK server applications and session managers are fixed in version 1.29.1 and version 2.1.0. Affected versions are releases before 1.29.1 and versions from 2.0.0a1 through 2.0.1.