MCP server security is mostly OAuth security, and in October 2026 the official TypeScript SDK showed how easily it goes wrong. Its server-side bearer auth could accept a valid token that was issued for a different service, and the patch adds a check that is off by default. Upgrading alone changes nothing until you configure it.
Last updated: 2026-11-11. Advisory details, CVE scores and spec wording below were read at the primary sources listed at the end on that date. We did not scan or probe any third-party system.
Key takeaways
- A remote MCP server is an OAuth resource server. Treat it like your API, not like a plugin.
- Check
aud. The TypeScript SDK fix is opt-in, so upgrading to 1.32.0 does not protect you until you set it. - Never forward the client’s token to a downstream API. The spec forbids it.
- If your product connects to third-party MCP servers, the server can be the attacker. Validate the metadata
resource, redirects and URLs. - Isolate each client. Shared server instances delivered one client’s responses to another in
@modelcontextprotocol/server2.x.
What changed in October 2026: five MCP SDK advisories, one theme
Between 5 and 27 October 2026, advisories landed in the TypeScript SDK, the Python SDK and the Go library mcp-go. None of them is about the model. They are OAuth and HTTP plumbing bugs in the integration layer. None is in CISA’s KEV catalog, and no vendor reports exploitation.
Here is each one, mapped to what it means for you.
TypeScript SDK: bearer auth accepted another service’s token
According to GHSA-rvq5-wwqv-78pq (CVE-2026-111771), the server’s bearer authentication “accepted tokens issued for another service”. GitHub rates it moderate: CVSS 3.1 score 6.8, CWE-863. It was published on 5 October 2026.
Affected versions per the advisory:
@modelcontextprotocol/sdk1.6.0 through 1.31.0 (fixed in 1.32.0)@modelcontextprotocol/server2.0.0 through 2.2.0 (fixed in 2.3.0)@modelcontextprotocol/express2.0.0 through 2.0.1 (fixed in 2.0.2)@modelcontextprotocol/server-legacy2.0.0 through 2.3.0 (fixed in 2.3.1)
You are affected only if three things are true. You use requireBearerAuth() or verifyBearerToken(). Your authorization server issues tokens for other services too. And your verifyAccessToken() ignores the aud claim.
TypeScript SDK: one client’s responses delivered to another
GHSA-jm63-cq47-j5jp (CVE-2026-111770) is rated high: CVSS 7.7, CWE-362, published 15 October 2026. A shared stateless transport, or a single McpServer instance, could deliver one HTTP client’s responses to another. Messages were keyed only by the JSON-RPC id, and SDK clients start their IDs at 0.
It affects @modelcontextprotocol/server 2.0.0 through 2.2.0 (fixed in 2.3.0). The advisory says the README examples for Hono, Express, Fastify and Node showed the vulnerable pattern before 2.3.0. @modelcontextprotocol/sdk 1.26.0 and later is not affected.
TypeScript SDK: cross-origin redirects kept custom headers
According to the GitHub Advisory Database entry for GHSA-6prh-2h8m-c8cw (CVE-2026-111769, CVSS 6.5), HTTP client transports and OAuth client requests followed cross-origin redirects while keeping custom headers, and bodies on 307 and 308. It affects @modelcontextprotocol/sdk through 1.31.0 (fixed in 1.32.0) and @modelcontextprotocol/client 2.0.0 through 2.2.0 (fixed in 2.3.0).
mcp-go: unvalidated resource in Protected Resource Metadata
The mcp-go advisory GHSA-xf6j-693p-wqxx is rated high. The OAuth client did not validate the resource value in well-known Protected Resource Metadata. The check from RFC 9728 was applied only on the WWW-Authenticate path. A malicious MCP server could therefore make the client request a token for a different MCP resource.
It affects mcp-go from 0.48.0 through 1.2.0 and is fixed in 1.2.1. It was published on 9 October 2026.
On CVE numbers: NVD lists CVE-2026-123272 for this issue, assigned by CNA VulnCheck and published 5 November 2026. The score of 8.0 is VulnCheck’s CVSS 3.1 score. Its CVSS 4.0 score is 5.1, and NVD’s status is “Deferred”. The GitHub advisory page showed “No known CVE” when we read it, and GitHub lists no CVSS for it.
Python SDK: $ref fetched from the client’s context
The Python SDK advisory GHSA-rwrf-2pqf-9j8j (CVE-2026-116686, CVSS 6.5) covers client tool calls that resolved $ref in a server-declared outputSchema. That could fetch HTTP, HTTPS or file URLs from the client’s context. It is fixed in mcp 1.30.0 and 2.2.0. The mechanism is a close cousin of the one in our SSRF prevention guide.
Timeline
| Date | Event |
|---|---|
| Apr 2025 | RFC 9728 (Protected Resource Metadata) published |
| 2026-07-28 | Current MCP spec revision. Dynamic client registration deprecated; Client ID Metadata Documents are a SHOULD |
| 5 Oct 2026 | TypeScript SDK GHSA-rvq5-wwqv-78pq (audience not enforced) |
| 9 Oct 2026 | mcp-go GHSA-xf6j-693p-wqxx (unvalidated resource), fixed in 1.2.1 |
| 15 Oct 2026 | TypeScript SDK GHSA-jm63-cq47-j5jp (cross-client message delivery) |
| 20 Oct 2026 | TypeScript SDK GHSA-6prh-2h8m-c8cw (cross-origin redirect keeps headers) |
| 27 Oct 2026 | Python SDK GHSA-rwrf-2pqf-9j8j (outputSchema $ref fetch) |
| 5 Nov 2026 | NVD publishes CVE-2026-111771, -111770, -111769 and CVE-2026-123272 (mcp-go) |
Our reading, and it is ours: MCP is not broken by design. The spec already requires the controls these bugs skipped. The failures were in implementations and in defaults, so you have to test for them.
Why audience is the whole game
The current MCP spec (revision 2026-07-28) says MCP servers “MUST validate that access tokens were issued specifically for them as the intended audience”, following RFC 8707. They also “MUST NOT accept or transit any other tokens”.
On the client side, the spec requires the resource parameter, set to the canonical MCP server URI, in both authorization and token requests. It applies “regardless of whether authorization servers support it”.
Here is why this bites startups. One identity-provider tenant (Auth0, Okta, Entra, Cognito) usually issues tokens for your main API, your admin API and your new MCP server. If no service checks aud, a token minted for one of them may open all of them. That is our analysis. It matches the conditions in the TypeScript advisory above.
The rule in one line: issuer valid, signature valid and not expired is not authorization. Audience is what says the token was meant for you. We cover the validation mechanics in our JWT vulnerabilities post, so we will not repeat them here.
Token passthrough and the confused deputy
Token passthrough means your MCP server forwards the token it got from the client to a downstream API. The spec says the MCP server “MUST NOT pass through the token it received from the MCP client”.
The MCP Security Best Practices list the risks:
- Downstream controls get bypassed.
- Audit trails break, because the downstream API sees the wrong identity.
- The server becomes a proxy for data exfiltration.
The confused deputy trap in OAuth proxies
The same document describes the confused deputy problem. It needs four conditions together:
- A static client ID at the upstream authorization server.
- Dynamic registration of MCP clients.
- A consent cookie at the third-party authorization server.
- No per-client consent at the MCP proxy.
An attacker registers a client with their own redirect_uri. Because the consent cookie is already present, the consent screen is skipped and the code goes to the attacker.
The required mitigations are specific. Keep a per-user registry of approved client_id values and check it before the upstream flow. Match redirect_uri exactly. Use a single-use state that is set only after consent. Use __Host- cookies.
One more note: dynamic client registration is now deprecated in the spec in favour of Client ID Metadata Documents, which the spec says SHOULD be supported.
The client side: when the MCP server is the attacker
If your product connects to customer-supplied or user-supplied MCP servers, such as agents or an “add a connector” screen, you are the OAuth client. The server on the other end may be hostile. Three rules apply.
Validate the metadata resource
RFC 9728, section 3.3, says the resource in the metadata “MUST be identical” to the URL used to fetch it, or the data “MUST NOT be used”. The mcp-go advisory is exactly this check, skipped on one code path.
Treat OAuth discovery as an SSRF surface
The security best practices flag SSRF through OAuth discovery. A malicious server can point resource_metadata, authorization_servers or the authorization endpoints at 169.254.169.254 or other internal hosts. Clients SHOULD enforce HTTPS, block private ranges, validate every redirect hop and use an egress proxy.
Reject dangerous authorization URLs
Clients MUST reject javascript:, data: and file: authorization URLs. They MUST NOT open URLs through a shell.
Connecting to untrusted servers is where this becomes AI red team scope for us. The auth plumbing and the agent’s reach are one attack path.
The 6-check MCP server security self-test
Run these against your own systems only. Do not send test tokens to servers you do not own or have written permission to test.
- Wrong-audience token. Mint a valid token from your identity provider for a different API in the same tenant. Send it to your MCP endpoint. Expect 401. On the TypeScript SDK, set
expectedResourceand also return the token’s audience asAuthInfo.resourcefromverifyAccessToken(). Setting only the first makes every request return 401, per the advisory. - No passthrough. Search the code for anywhere the inbound
Authorizationheader is forwarded upstream. Upstream calls need their own token, from token exchange or the server’s own OAuth client. RFC 8693 token exchange is one option; that suggestion is ours. - Protected Resource Metadata is correct.
/.well-known/oauth-protected-resourcemust return aresourceequal to your canonical MCP URI, plus at least one entry inauthorization_servers. - Per-session isolation. On
@modelcontextprotocol/server2.x, confirm you create one server and transport per request or per session (thecreateMcpHandler()factory, orsessionIdGenerator). Upgrading to 2.3.0 breaks shared instances on purpose, with anALREADY_CONNECTEDerror. - Scope minimization. Do not publish every scope in
scopes_supported. Use step-upinsufficient_scopechallenges for write and admin tools. - Client hygiene. If you connect to third-party MCP servers: SDKs at or above the fixed versions, no redirects that carry custom headers across origins, and private IP ranges blocked for OAuth discovery fetches.
Checks 1 to 4 take an afternoon. A red team chains them with tool permissions to answer the question that matters: what can a stolen or misrouted token actually do?
What a correct server looks like
These shapes are illustrative. Option and function names come from the advisory text; check exact signatures against the docs for your SDK version before you copy anything. First, the metadata your server should serve:
GET /.well-known/oauth-protected-resource HTTP/1.1
Host: mcp.example.com
HTTP/1.1 200 OK
Content-Type: application/json
{
"resource": "https://mcp.example.com",
"authorization_servers": ["https://auth.example.com"],
"scopes_supported": ["mcp:tools-basic"]
}
Then audience enforcement, which works on any SDK version. verifyJwtWithJwks is a placeholder for your own JWT library, not an SDK function.
// Server: audience enforcement
const EXPECTED_AUD = "https://mcp.example.com";
async function verifyAccessToken(token: string): Promise<AuthInfo> {
// signature, issuer, expiry via your JWT library
const claims = await verifyJwtWithJwks(token, { issuer: "https://auth.example.com" });
const aud = Array.isArray(claims.aud) ? claims.aud : [claims.aud];
if (!aud.includes(EXPECTED_AUD)) throw new InvalidTokenError("wrong audience"); // 401
return {
token,
clientId: claims.azp,
scopes: claims.scope?.split(" ") ?? [],
resource: new URL(EXPECTED_AUD),
};
}
// On patched SDKs, ALSO pass expectedResource to requireBearerAuth().
// Both halves are required.
What to fix first, in priority order
- Enforce
audon every MCP server now. Trade-off: tokens your authorization server issues without aresourcewill start failing. Configure an API or audience per MCP server first. - Upgrade the SDKs.
@modelcontextprotocol/sdk1.32.0,/server2.3.0,/express2.0.2,/server-legacy2.3.1, mcp-go 1.2.1, Pythonmcp1.30.0 or 2.2.0. Trade-off:/server2.3.0 forces a per-request or per-session refactor if you shared instances. MCP SDKs are dependencies like any other, so pin and patch them, as in our npm supply chain checklist. - Remove token passthrough. Use a separate upstream OAuth client or token exchange. Trade-off: more token plumbing, but correct identity in audit logs.
- Add per-client consent on OAuth proxies. Trade-off: one extra consent screen for each new client.
- Use least-privilege scopes plus step-up. Trade-off: more consent prompts, so design scope sets deliberately.
- Add egress controls on server-side MCP clients. Trade-off: allowlist maintenance. This also covers the Python
$reffetch and discovery SSRF.
What the MCP spec does not fix
Audience binding works “when the Authorization Server supports the capability”. If your authorization server ignores resource, the token’s audience will not be your MCP server. Then server-side validation is all you have.
The iss parameter defence from RFC 9207 only works if the honest authorization server sends iss, which the spec still treats as a SHOULD. And per the security best practices, localhost redirect URIs cannot be proven to belong to the client that a Client ID Metadata Document names.
None of this covers what an authorized agent does with legitimate tools. That is a different problem, covered in our guide to attacks on LLM apps. For a case where an internal AI tool was part of an attack after initial access, see our Binance incident write-up. MCP was not involved in it.
Why enterprise buyers will ask about this
If your AI feature plugs into a customer’s identity provider, their security questionnaire will soon include “are tokens audience-bound?” Having a tested answer helps the deal. Our guide on whether SOC 2 requires a penetration test covers the wider questionnaire picture.
We scope MCP and agent auth review inside our AI red team and pentest services: token audience, tool permissions, and what a misrouted token can reach. We also cover the common misconfigurations that sit around these integrations.
FAQ
Does upgrading @modelcontextprotocol/sdk to 1.32.0 fix the audience bug?
Not on its own. The fix adds an expectedResource option that is off by default. You must set it and also return the token’s audience from verifyAccessToken(). Or check aud yourself, which works on any version. Setting only expectedResource makes every request fail with 401.
What is token passthrough in MCP, and why is it forbidden?
Token passthrough is when your MCP server forwards the token it received from the client to a downstream API. The spec says servers MUST NOT do this. It bypasses downstream controls, breaks audit trails because the downstream API sees the wrong identity, and turns the server into a proxy for exfiltration.
What is the MCP confused deputy problem?
It affects MCP proxies that use a static upstream client ID together with dynamic client registration. An attacker registers a client with their own redirect URI and reuses an existing consent cookie, so the consent screen is skipped and the code goes to the attacker. The fix is per-client consent at the proxy.
Do stdio (local) MCP servers need OAuth?
No. The spec says stdio implementations SHOULD NOT use the OAuth flow and should take credentials from the environment instead. Local servers have their own risks, such as arbitrary command execution and DNS rebinding, but audience-bound OAuth tokens are a remote-server concern.
How do I test whether my MCP server accepts wrong-audience tokens?
Mint a valid token from your identity provider for a different API in the same tenant, and send it to your MCP endpoint. The expected result is 401. Run this only against systems you own. If the request succeeds, your server is not checking the audience.
Sources
- GHSA-rvq5-wwqv-78pq, TypeScript SDK bearer authentication
- GHSA-jm63-cq47-j5jp, TypeScript SDK shared transport
- GHSA-6prh-2h8m-c8cw, cross-origin redirect headers
- GHSA-xf6j-693p-wqxx, mcp-go Protected Resource Metadata and fix PR 1053
- GHSA-rwrf-2pqf-9j8j, Python SDK outputSchema $ref
- NVD: CVE-2026-111771, CVE-2026-111770, CVE-2026-111769, CVE-2026-116686, CVE-2026-123272
- MCP Specification 2026-07-28, Authorization
- MCP Specification 2026-07-28, Authorization Security Considerations
- MCP Specification 2026-07-28, Authorization Server Discovery
- MCP Security Best Practices
- MCP Versioning
- RFC 9728, OAuth 2.0 Protected Resource Metadata
Not sure whether your MCP server checks the audience? Start with a free external attack-surface snapshot, no access needed: nomorebreach.com.

