# CVE-2026-53965: MCP PHP SDK unbounded SSE buffer memory exhaustion

Source: https://junglewise.ai/threats/cve-2026-53965-mcp-php-sdk-unbounded-sse-buffer-memory-exhaustion  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-25. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-53965 · Severity: high · CVSS 4 · Published 2026-08-25

The MCP PHP SDK's HTTP client transport accumulates Server-Sent-Events (SSE) stream data in an unbounded in-memory buffer without enforcing any size limit. A remote server or network attacker that withholds the event delimiter (`\n\n`) can cause the buffer to grow indefinitely, exhausting the client's available memory and crashing the process. This is a denial-of-service attack against any client connecting to a malicious or compromised MCP server.

Vendors: [Anthropic](https://junglewise.ai/threats/vendors/anthropic), [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

**Is CVE-2026-53965 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-53965 being exploited in the wild.

**How severe is CVE-2026-53965?** High severity, with a CVSS score of 4, published 25 August 2026.

**Which products and versions are affected?** Anthropic Model Context Protocol PHP SDK >=0.5.0, <0.7.1; mcp/sdk (Packagist) >= 0.5.0, < 0.7.1, ECOSYSTEM:introduced=0.5.0,fixed=0.7.1.

**Is there a fix for CVE-2026-53965?** Yes. mcp/sdk (Packagist): upgrade to 0.7.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-53965 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-53965?** Check whether you run Anthropic Model Context Protocol PHP SDK or mcp/sdk (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- mcp/sdk (Packagist): upgrade to 0.7.1 or later

  ```sh
  composer require mcp/sdk:^0.7.1
  ```


## Technical details

The vulnerability exists in the `HttpTransport::processSSEStream()` method (line 203 of `src/Client/Transport/HttpTransport.php`), which reads up to 4096-byte chunks from an SSE response stream and appends them directly to `$this->sseBuffer` with no length validation. The buffer is only flushed when a complete SSE event delimiter (`\n\n`) is encountered; if the server never sends this delimiter, the buffer grows without bound across successive `tick()` loop iterations. A remote MCP server (or a network attacker intercepting plaintext responses) can stream arbitrary data without delimiters to force unbounded buffer accumulation. The attack requires network-level access to the server's SSE response body but no prior authentication. Proof-of-concept testing confirms that a 400 MB delimiter-free stream exhausts a 256 MB PHP memory limit. The fix, provided in version 0.7.1, bounds the SSE buffer length and aborts the stream when it exceeds a configured maximum (e.g., 8 MiB) without receiving a complete event.

## Affected products

- modelcontextprotocol php-sdk >=0.5.0, <0.7.1

## Identifiers

- CVE-2026-53965
- GHSA-7m52-jw36-44r3

## Timeline

- 2026-08-14: disclosed
- 2026-08-19: advisory: GHSA-7m52-jw36-44r3 published
- 2026-09-01: patched: Fix released in version 0.7.1

## References

- [https://api.github.com/users/tonghuaroot](https://api.github.com/users/tonghuaroot)
- [https://github.com/tonghuaroot](https://github.com/tonghuaroot)
- [https://api.github.com/users/tonghuaroot/gists%7B/gist_id%7D](https://api.github.com/users/tonghuaroot/gists%7B/gist_id%7D)
- [https://api.github.com/users/tonghuaroot/repos](https://api.github.com/users/tonghuaroot/repos)
- [https://avatars.githubusercontent.com/u/23011166?v=4](https://avatars.githubusercontent.com/u/23011166?v=4)
- [https://api.github.com/users/tonghuaroot/events%7B/privacy%7D](https://api.github.com/users/tonghuaroot/events%7B/privacy%7D)
