---
id: CVE-2026-53965
title: >-
  The MCP PHP SDK (Composer package mcp/sdk) is the official Model Context
  Protocol SDK for PHP
summary: >-
  The MCP PHP SDK (Composer package mcp/sdk) is the official Model Context
  Protocol SDK for PHP. In versions 0.5.0 through 0.7.0, the HTTP client
  transport reads a Server-Sent Events response stream incrementally and appends
  each chunk to …
severity: high
cwe:
  - CWE-400
  - CWE-770
vendor: mcp
product: mcp/sdk
affected:
  - 'mcp/sdk >= 0.5.0, < 0.7.1'
patched:
  - mcp/sdk 0.7.1
published: '2026-08-25'
updated: '2026-09-09'
sourceUpdated: '2026-09-09T21:07:31.353'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-53965'
references:
  - url: >-
      https://github.com/modelcontextprotocol/php-sdk/commit/055593f2592e1d7f5f48587c999ca7068a3be90d
    label: security-advisories@github.com
  - url: 'https://github.com/modelcontextprotocol/php-sdk/releases/tag/v0.7.1'
    label: security-advisories@github.com
  - url: >-
      https://github.com/modelcontextprotocol/php-sdk/security/advisories/GHSA-7m52-jw36-44r3
    label: security-advisories@github.com
  - url: >-
      https://github.com/modelcontextprotocol/php-sdk/security/advisories/GHSA-7m52-jw36-44r3
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: >-
      https://github.com/FriendsOfPHP/security-advisories/blob/master/mcp/sdk/CVE-2026-53965.yaml
  - url: 'https://github.com/advisories/GHSA-7m52-jw36-44r3'
tags:
  - nvd
  - ghsa
  - composer
epss: 0.00615
epssPercentile: 0.47234
aliases:
  - GHSA-7m52-jw36-44r3
ecosystem: composer
ingestedAt: '2026-08-19T19:44:03.088Z'
---

## Overview

The MCP PHP SDK (Composer package mcp/sdk) is the official Model Context Protocol SDK for PHP. In versions 0.5.0 through 0.7.0, the HTTP client transport reads a Server-Sent Events response stream incrementally and appends each chunk to an in-memory buffer with no upper bound. The buffer is only flushed when an SSE event delimiter, a double newline, is found, so a remote MCP server that streams response bytes without ever sending the delimiter causes the buffer to grow without limit. A malicious, compromised, or man-in-the-middle-controlled server that the client connects to over the HTTP transport can exploit this to exhaust the client process's memory, triggering a fatal allocation error or OS out-of-memory kill and denying service to the MCP client. The issue affects any client using HttpTransport against an untrusted server endpoint and does not require authentication or user interaction beyond initiating the connection. This issue is fixed in version 0.7.1.

## Remediation

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

## Package advisory (CVE-2026-53965)

Affected packages:

- `mcp/sdk >= 0.5.0, < 0.7.1`

Patched in:

- `mcp/sdk 0.7.1`

Source: https://github.com/advisories/GHSA-7m52-jw36-44r3
