Advisories for Npm/@Modelcontextprotocol/Server package

2026

MCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation

In affected versions, servers put no limit on how many array elements and object keys they validated in one request. One HTTP request within the default 4 MiB size limit could exhaust the server's memory, and the process aborted with JavaScript heap out of memory. No credentials are needed, unless you authenticate requests before they reach the SDK.

MCP TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another

In affected versions, an MCP server reached over HTTP could deliver one client's responses and notifications to another client. This happened when clients shared one stateless transport, or one McpServer or Server instance. Messages were matched to a connection by JSON-RPC id alone. SDK clients number requests from 0, so ids collide in normal use.