# MCP PHP SDK: client HttpTransport SSE buffer (sseBuffer .= chunk) grows unbounded when server withholds the event delimiter

High severity, published 2026-08-19. Update mcp/sdk to 0.7.1 or later: composer update mcp/sdk.

Canonical URL: https://buzzphp.com/security/ghsa-7m52-jw36-44r3 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high |
| Published | 2026-08-19 |
| Updated | 2026-09-01 |
| CVE | [CVE-2026-53965](https://nvd.nist.gov/vuln/detail/CVE-2026-53965) |
| GHSA | [GHSA-7m52-jw36-44r3](https://github.com/advisories/GHSA-7m52-jw36-44r3) |
| Weakness | CWE-400, CWE-770 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| mcp/sdk | >= 0.5.0, < 0.7.1 | 0.7.1 |

## What to do

Update mcp/sdk to 0.7.1 or later: composer update mcp/sdk.

Check which version you run with `composer show mcp/sdk`, and every affected package with `composer audit`.

## About this advisory

Summary

The HTTP client transport in mcp/sdk reads a Server-Sent-Events (SSE) response stream incrementally and appends each 4 KiB chunk to an in-memory buffer ($this-sseBuffer .= $chunk;) with no upper bound. The buffer is only ever flushed when an SSE event delimiter ("\n\n") appears. A remote MCP server (the peer the client connects to) that streams response bytes without ever sending the "\n\n" delimiter makes $sseBuffer grow without limit until the client process exhausts its PHP memorylimit (fatal "Allowed memory size … exhausted") or is killed by the OS OOM-killer.



## Links

- [GHSA-7m52-jw36-44r3 on GitHub](https://github.com/advisories/GHSA-7m52-jw36-44r3)
- [CVE-2026-53965 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-53965)
- [All Composer security advisories](https://buzzphp.com/security)
