The client picked the number
The official MCP TypeScript server matched every response to its recipient by a request id that each client starts counting from zero. A Postgres MCP server keyed its login throttle on an address the caller typed into a header. Two records this week, one mistake: asking the client who it is.
Before a server can decide whether to trust a request, it has to answer a simpler question: who is this from, and who gets the answer. This week two MCP projects answered it the same way. They asked the client, and believed what came back.
A counter is not a caller
JSON-RPC gives every request an id so that a client can match an answer to the question it asked. The id is chosen by the client, and it only has to be unique within that one client's conversation. It was never meant to tell two clients apart, and with every SDK client counting from the same starting point, it cannot.
That is fine while one server talks to one client. It stops being fine the moment one server instance is put in front of many, which is exactly what a hosted MCP endpoint is. Two agents send their first request. Both call it the same thing. The server keeps one table from id to stream, and one of them gets the other's answer.
2.2.0, the routing table:
private _requestToStreamMapping: Map<RequestId, string>
2.3.0, the new guard:
if (!this.sessionIdGenerator && this._hasHandledRequest) {
throw new Error('Stateless transport cannot be reused
across requests. Create a new transport per request.');
}The uncomfortable part is not the bug. It is that no attacker is needed to trigger it, and that the shared instance was the pattern the examples taught. Nobody had to misconfigure anything. They had to copy the README.
For an agent this cuts both ways. A tool result is not just data the client displays; it is input the model acts on. A response delivered to the wrong client is a leak for the one who lost it and foreign input for the one who received it.
A header is not an address
pgEdge's Postgres MCP server made the same choice one layer down. To throttle password guessing it needed to know where a login came from, and it took the answer from X-Forwarded-For, reading the leftmost entry. That is the one position in the header that the caller writes and no proxy ever checks. Each proxy appends what it saw to the right; whatever the client invented stays on the left.
So the limiter counted attempts per claimed address. An attacker could claim a new one on every try and never be throttled, or claim the victim's and lock the victim out instead. A rate limit keyed on a value the caller picks is not a rate limit. It is a suggestion the caller is free to ignore.
The fix that breaks your server, on purpose
Two weeks ago we wrote about an MCP SDK fix that ships switched off, so that upgrading changes nothing and every scanner reports you patched. This release goes the other way. A shared instance now refuses to serve a second client, so the upgrade breaks every application that relied on the unsafe pattern, loudly, on the first request.
That is the right call, and it is worth saying why. A silent fix for a design flaw leaves the design in place. A fix that fails closed forces somebody to look at the code, which is the only way the per-session boundary actually gets drawn. pgEdge did the equivalent: the new resolver ignores forwarding headers unless the operator names the proxy that is allowed to set them.
Trust is the attack surface
Every multi-tenant server rests on one decision made before any authentication check runs: which caller is this, and which caller gets the answer. If that decision is made from a field the caller controls, everything built on top of it inherits the caller's choice. Identity has to come from something the client cannot write: the connection, a session the server issued, or a proxy the operator named.
What to actually do
- Upgrade @modelcontextprotocol/server and pgEdge Postgres MCP Server. Expect the SDK upgrade to fail requests if your code shares an instance. That failure is the finding, not a regression.
- Build the MCP server per request or per session. Grep for a McpServer or transport constructed at module scope next to an HTTP handler. If the endpoint is reachable by more than one client, that is the vulnerable shape, on any version.
- Test with two clients, not one. Run two SDK clients against the same endpoint at once and assert each only ever receives its own results. A single-client test cannot see this class of bug.
- Never key a security decision on X-Forwarded-For as sent. Take the socket address, or read the header right to left and only from a proxy you have named. Check that your own reverse proxy replaces the header rather than appending to it.
- Turn on account lockout where it exists. A per-address throttle is only one control. If the product ships a per-account lockout disabled, it is not protecting you.
- CVE-2026-111770, assigned by GitHub and published 5 November 2026, from advisory GHSA-jm63-cq47-j5jp (published 20 October 2026): in @modelcontextprotocol/server from 2.0.0 up to but not including 2.3.0, an HTTP server whose clients shared one stateless transport, or one McpServer or Server instance, could deliver one client's responses and notifications to another client. Fixed in 2.3.0.
- Per the advisory, messages were matched to a connection by JSON-RPC id alone, and SDK clients number requests from 0, so ids collide in normal use. The condition is an HTTP endpoint reachable by more than one client and code that builds the transport or server once at startup instead of once per request or per session.
- Per the advisory, until the fixed release the README examples of the @modelcontextprotocol/hono, express, fastify and node packages showed that shared pattern. Not affected: stdio servers, createMcpHandler() with a factory that builds a new server on every call, and @modelcontextprotocol/sdk 1.26.0 and later.
- Per the advisory, the fix makes the SDK refuse to be shared: a second connect() rejects with ALREADY_CONNECTED and a stateless transport rejects its second request, so an affected application fails requests after upgrading and needs a code change. The same change also fixes affected versions.
- In packages/server/src/server/streamableHttp.ts at @modelcontextprotocol/server 2.2.0, the transport maps requests to response streams in a Map keyed by RequestId. At 2.3.0 a transport without a sessionIdGenerator throws on its second request.
- Weakness on CVE-2026-111770: CWE-362, concurrent execution using a shared resource with improper synchronisation.
- GitHub's score on CVE-2026-111770: CVSS 3.1 base 7.7, high attack complexity, no privileges, high confidentiality and availability impact, low integrity impact.
- The same TypeScript SDK releases also fixed CVE-2026-111768, CVE-2026-111769 and CVE-2026-111771. They are not analysed here.
- CVE-2026-125321, assigned by GitHub and published 10 November 2026: pgEdge Postgres MCP Server before 1.1.0, on the non-default HTTP transport with authentication enabled, took the leftmost caller-supplied X-Forwarded-For value as the client address for login rate limiting, so an unauthenticated caller could rotate addresses to evade throttling or claim another user's address to use up that user's limit. Fixed in 1.1.0.
- Per the record, the nginx configuration pgEdge published appended to X-Forwarded-For rather than replacing it, so the flaw was reachable without operator misconfiguration, and the separate username-keyed lockout shipped disabled by default with MaxFailedAttemptsBeforeLockout set to 0.
- In internal/auth/middleware.go at v1.0.0, ExtractIPAddress returns the first comma-separated entry of X-Forwarded-For when the header is present, then X-Real-IP, then the socket address. At v1.1.0 it delegates to a resolver in internal/auth/client_ip.go that uses the socket address by default and reads a forwarding header only from a configured trusted proxy, right to left.
- Weakness on CVE-2026-125321: CWE-770, allocation of resources without limits or throttling; the CVE record adds CWE-807, reliance on untrusted inputs in a security decision.
- GitHub's score on CVE-2026-125321: CVSS 3.1 base 6.5, network, no privileges, no user interaction, low confidentiality and availability impact.
- The NVD entries carry CISA SSVC assessments: exploitation none and technical impact partial for both, automatable no for CVE-2026-111770 and yes for CVE-2026-125321.
- NVD status on 11 November 2026 for both records: Received, with no NVD score of its own.
- Whether either flaw has been exploited, or whether any shared MCP server has actually handed one client's results to another. The records do not say so, and we hold no telemetry: our public sensor is offline.
- How many deployments copied the shared-instance pattern from the README examples, or run pgEdge's server on the HTTP transport behind the published nginx configuration. Nobody has published deployment counts.
- Which 1.x versions were affected by CVE-2026-111770. The CVE record lists the typescript-sdk product as affected below 1.32.0, while the advisory states that @modelcontextprotocol/sdk 1.26.0 and later is not affected. We cite the advisory and flag the disagreement.
- pgEdge's own GitHub advisory for CVE-2026-125321. GitHub was out of reach from our tooling and the advisory has no OSV mirror yet, so nothing here rests on it beyond what the CVE record states.
- We reproduced neither flaw. Everything here rests on the records, the SDK advisory and the source at the tags named in the ledger.
- 01GHSA-jm63-cq47-j5jp: Shared transport or server instances delivered one HTTP client's messages to another ↗
- 02CVE-2026-111770 ↗
- 03CVE-2026-111770 record ↗
- 04Streamable HTTP server transport at @modelcontextprotocol/server 2.2.0 ↗
- 05Streamable HTTP server transport at @modelcontextprotocol/server 2.3.0 ↗
- 06CVE-2026-125321 ↗
- 07CVE-2026-125321 record ↗
- 08pgEdge auth middleware at v1.0.0 ↗
- 09pgEdge client address resolver at v1.1.0 ↗
- 10GHSA-jm63-cq47-j5jp, mirrored ↗
