MCP Java initialization flood retains unlimited sessions
The HTTP transport allocates persistent session state on initialization without a default expiry or session-count bound. A client that repeatedly initializes without deleting its sessions can exhaust server memory.
The HTTP transport allocates persistent session state on initialization without a default expiry or session-count bound. A client that repeatedly initializes without deleting its sessions can exhaust server memory.
This is a maintainer-documented vulnerability disclosure. The advisory lists affected ranges: io.modelcontextprotocol.sdk:mcp-core >= 0.11.0, 0 < 0.18.5; io.modelcontextprotocol.sdk:mcp-core >= 1.0.0, < 1.1.5; io.modelcontextprotocol.sdk:mcp-core >= 2.0.0, < 2.1.0. Patched release lines: io.modelcontextprotocol.sdk:mcp-core 0.18.5; io.modelcontextprotocol.sdk:mcp-core 1.1.5; io.modelcontextprotocol.sdk:mcp-core 2.1.0. Consult the specific advisory for configuration requirements and branch coverage.
Takeaway
Use a patched release on a supported branch and verify the relevant browser, process or session boundary. Keep untrusted MCP endpoints and imported configurations outside privileged runtime contexts.