CVE-2026-39313
Unrestricted Memory Allocation in mcp-framework Causes DoS
Publication date: 2026-04-16
Last updated on: 2026-04-16
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| quantgeekdev | mcp-framework | to 0.2.22 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-770 | The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
The vulnerability exists in the mcp-framework versions 0.2.21 and below, specifically in the readRequestBody() function of the HTTP transport. This function concatenates incoming request body chunks into a string without enforcing any size limit, despite the presence of a maxMessageSize configuration value that is never applied. As a result, a remote unauthenticated attacker can send a single large POST request to the /mcp endpoint, causing the server to exhaust its memory and crash.
How can this vulnerability impact me? :
This vulnerability can lead to a denial of service (DoS) condition on any mcp-framework HTTP server running vulnerable versions. An attacker can remotely crash the server by sending a large POST request, causing memory exhaustion. This disrupts the availability of the service, potentially leading to downtime and loss of access for legitimate users.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, upgrade the mcp-framework to version 0.2.22 or later, where the issue has been fixed.