---
id: CVE-2026-59951
title: >-
  The MCP Python SDK, called mcp on PyPI, is a Python implementation of the
  Model Context Protocol (MCP)
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 …
severity: medium
cvss: 6.9
cvssVector: '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'
cwe:
  - CWE-400
  - CWE-772
  - CWE-770
vendor: modelcontextprotocol
product: python-sdk
affected:
  - 'python-sdk >= 1.8.0, < 1.30.0'
  - 'python-sdk >= 2.0.0, < 2.2.0'
patched:
  - mcp 1.30.0
  - mcp 2.2.0
published: '2026-10-14'
updated: '2026-10-16'
sourceUpdated: '2026-10-16T16:00:33.533'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-59951'
references:
  - url: >-
      https://github.com/modelcontextprotocol/python-sdk/commit/92120b4b0f50385af096592d7cee932fc1d994e7
    label: security-advisories@github.com
  - url: >-
      https://github.com/modelcontextprotocol/python-sdk/commit/d2290ca3434731b68ea3e2270bc06a6e6575931b
    label: security-advisories@github.com
  - url: 'https://github.com/modelcontextprotocol/python-sdk/pull/3395'
    label: security-advisories@github.com
  - url: 'https://github.com/modelcontextprotocol/python-sdk/pull/3426'
    label: security-advisories@github.com
  - url: 'https://github.com/modelcontextprotocol/python-sdk/releases/tag/v1.30.0'
    label: security-advisories@github.com
  - url: 'https://github.com/modelcontextprotocol/python-sdk/releases/tag/v2.2.0'
    label: security-advisories@github.com
  - url: >-
      https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-84m7-p3x7-pcfv
    label: security-advisories@github.com
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-59951'
  - url: 'https://github.com/advisories/GHSA-84m7-p3x7-pcfv'
  - url: 'https://github.com/modelcontextprotocol/python-sdk'
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-59951.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-59951'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2552683'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-59951'
tags:
  - nvd
  - cve.org
  - ghsa
  - pip
  - osv
  - csaf
  - vex
  - red-hat
epss: 0.00458
epssPercentile: 0.39831
aliases:
  - GHSA-84m7-p3x7-pcfv
ecosystem: pip
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-10-15T13:55:54.339140Z'
cvssSource: cna
scores:
  cna: 6.9
  ghsa: 7.5
  osv: 7.5
  vendor: 7.5
ingestedAt: '2026-10-14T17:44:53.676Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-59951)

Affected packages:

- `mcp >= 1.8.0, < 1.30.0`
- `mcp >= 2.0.0, < 2.2.0`

Patched in:

- `mcp 1.30.0`
- `mcp 2.2.0`

Source: https://github.com/advisories/GHSA-84m7-p3x7-pcfv

## Vendor advisories

- **Red Hat VEX** · Important · affected: Ansible Automation Orchestrator 2026, Exploit Intelligence, Lightspeed Core, Migration Toolkit for Applications 8, OpenShift Lightspeed, Red Hat AI Inference Server, … · no fix planned: Ansible Automation Orchestrator 2026, Exploit Intelligence, Lightspeed Core, Migration Toolkit for Applications 8, … · updated 2026-10-19 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-59951.json)
