Skip to content
Heist/ feed
Back to feed
Medium

MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion

Type: advisorySources: OSV

The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). From 1.8.0 until 1.30.0 and 2.2.0, stateful Streamable HTTP servers, including FastMCP, MCPServer, Server.streamable_http_app(), and StreamableHTTPSessionManager, retain session entries without an idle expiration or aggregate session-count limit. DELETE, refused opening requests, and completed sessions do not reliably discard their entries, and each entry can retain parsed initialize parameters. A client that can reach the endpoint can therefore create ordinary short requests that grow server memory without bound until restart. Stateless HTTP, stdio, and SSE transports are not affected. This issue is fixed in versions 1.30.0 and 2.2.0.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-59951
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 00:36 UTC · Revision 1

Source evidence

MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion

core-osv · Original source

Published 14 Oct 2026, 16:22 UTC

The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). From 1.8.0 until 1.30.0 and 2.2.0, stateful Streamable HTTP servers, including FastMCP, MCPServer, Server.streamable_http_app(), and StreamableHTTPSessionManager, retain session entries without an idle expiration or aggregate session-count limit. DELETE, refused opening requests, and completed sessions do not reliably discard their entries, and each entry can retain parsed initialize parameters. A client that can reach the endpoint can therefore create ordinary short requests that grow server memory without bound until restart. Stateless HTTP, stdio, and SSE transports are not affected. This issue is fixed in versions 1.30.0 and 2.2.0.

osv:CVE-2026-59951
Complete source record
{
  "id": "709f7de5dfa3311017aec9afc1819d56290b8253e7e1aec29d3a2220d3e824b0",
  "url": "https://osv.dev/vulnerability/CVE-2026-59951",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhaustion",
    "summary": "The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). From 1.8.0 until 1.30.0 and 2.2.0, stateful Streamable HTTP servers, including FastMCP, MCPServer, Server.streamable_http_app(), and StreamableHTTPSessionManager, retain session entries without an idle expiration or aggregate session-count limit. DELETE, refused opening requests, and completed sessions do not reliably discard their entries, and each entry can retain parsed initialize parameters. A client that can reach the endpoint can therefore create ordinary short requests that grow server memory without bound until restart. Stateless HTTP, stdio, and SSE transports are not affected. This issue is fixed in versions 1.30.0 and 2.2.0.",
    "evidence": "osv:CVE-2026-59951",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-59951",
      "aliases": [
        "CVE-2026-59951",
        "GHSA-84m7-p3x7-pcfv"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/modelcontextprotocol/python-sdk",
              "type": "GIT",
              "events": [
                {
                  "introduced": "ed25167fa5d715733437996682e20c24470e8177"
                },
                {
                  "fixed": "8c2fa6eabacde869d75568e33b9d466b58c2f512"
                },
                {
                  "introduced": "6f69a3758ebf2ee55ce050f58b470ce11af71133"
                },
                {
                  "fixed": "9972c21aa42054fb1450c5fc614761ed11847ec6"
                },
                {
                  "fixed": "92120b4b0f50385af096592d7cee932fc1d994e7"
                },
                {
                  "fixed": "d2290ca3434731b68ea3e2270bc06a6e6575931b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "1.8.0"
                      },
                      {
                        "fixed": "1.30.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "introduced": "2.0.0"
                      },
                      {
                        "fixed": "2.2.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "92120b4b0f50385af096592d7cee932fc1d994e7"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "d2290ca3434731b68ea3e2270bc06a6e6575931b"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "8c2fa6eabacde869d75568e33b9d466b58c2f512"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v1.30.0"
                  },
                  {
                    "range": [
                      {
                        "fixed": "9972c21aa42054fb1450c5fc614761ed11847ec6"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v2.2.0"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.29.1",
            "v2.1.1",
            "v2.0.0",
            "v2.1.0",
            "v1.29.0",
            "v1.28.1",
            "v1.28.0",
            "v1.27.2",
            "v1.27.1",
            "v1.27.0",
            "v1.26.0",
            "v1.25.0",
            "v1.24.0",
            "v1.23.3",
            "v1.23.2",
            "v1.23.1",
            "v1.23.0",
            "v1.22.0",
            "v1.21.1",
            "v1.21.0",
            "v1.20.0",
            "v1.19.0",
            "v1.18.0",
            "v1.17.0",
            "v1.16.0",
            "v1.15.0",
            "1.15.0",
            "v1.14.1",
            "v1.14.0",
            "v1.13.1",
            "v1.13.0",
            "v1.12.4",
            "v1.12.3",
            "v1.12.2",
            "v1.12.1",
            "v1.12.0",
            "v1.11.0",
            "v1.10.1",
            "v1.10.0",
            "v1.9.4",
            "v1.9.3",
            "v1.9.2",
            "v1.9.1",
            "v1.9.0",
            "v1.8.1",
            "v1.8.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-59951.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:48.306402240Z",
      "provider": "osv",
      "references": [
        "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/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59951.json",
        "https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-84m7-p3x7-pcfv",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-59951",
        "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"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-400",
          "CWE-772"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59951.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-59951",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 516669,
  "published_at": "2026-10-14T16:22:31.653+00:00"
}