BuzzPHP
LightDarkSystem

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

High severity. Published 19 August 2026. Update mcp/sdk to 0.7.1 or later: composer update mcp/sdk.

Which versions are affected?

PackageAffected versionsFixed in
mcp/sdk (opens in a new tab)>= 0.5.0, < 0.7.10.7.1

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show mcp/sdk
composer audit

Advisory details

SeverityHigh
Published
Updated
CVECVE-2026-53965 (opens in a new tab)
GHSAGHSA-7m52-jw36-44r3 (opens in a new tab)
WeaknessCWE-400, CWE-770

What the advisory says

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.

Source: GHSA-7m52-jw36-44r3 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

All Composer security advisories