AAK-MCP-TSSDK-CVE-2026-111771-001: MCP TypeScript SDK: server bearer authentication accepts a token issued for another service
- Severity
- MEDIUM
- Category
- Supply Chain (
supply-chain) - Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py- Auto-fixable
- No.
- SARIF name
McpTypeScriptSdkBearerAudience
What it detects
The official MCP TypeScript SDK's server-side bearer authentication (requireBearerAuth(), and verifyBearerToken() on 2.x) had no way to check a token's audience. Where one authorization server issues tokens for several services, a valid token for another service was accepted by the MCP server, and its holder got what an authenticated caller can read and do (CVE-2026-111771, CVSS 3.1 6.8, CWE-863, GHSA-rvq5-wwqv-78pq). A server is exposed only when its verifyAccessToken() does not check aud itself. It affects @modelcontextprotocol/sdk from 1.6.0, where requireBearerAuth() first ships, up to 1.32.0; @modelcontextprotocol/server 2.0.0 up to 2.3.0; @modelcontextprotocol/express 2.0.0 up to 2.0.2; and @modelcontextprotocol/server-legacy 2.0.0 up to 2.3.1. The fixed releases add an expectedResource option that is off by default (modelcontextprotocol/typescript-sdk#2929, #2930 and #2952).
How to fix
Upgrade to @modelcontextprotocol/sdk 1.32.0, @modelcontextprotocol/server 2.3.0 together with @modelcontextprotocol/express 2.0.2 where you use it, or @modelcontextprotocol/server-legacy 2.3.1, or later, and pin it. The advisory says upgrading alone changes nothing: pass expectedResource, the audience your authorization server puts in tokens for your server, to requireBearerAuth(), and return the token's audience from verifyAccessToken() as AuthInfo.resource. Make both changes together; with only the first, every request gets 401. If you cannot upgrade yet, reject any token whose aud does not include your server inside verifyAccessToken(), which closes the issue on every version.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-MCP-TSSDK-CVE-2026-111771-001
Limitations
Reports @modelcontextprotocol/sdk from 1.6.0 up to 1.32.0, @modelcontextprotocol/server from 2.0.0 up to 2.3.0, @modelcontextprotocol/express from 2.0.0 up to 2.0.2 and @modelcontextprotocol/server-legacy from 2.0.0 up to 2.3.1 where a package.json, lockfile or MCP config states the version, reporting a range that admits an affected version. latest of each is fixed and states no version, so it is not reported. It reads the version, not the code: a fixed release without expectedResource set, which the advisory says is still exposed, is not reported, and a server whose verifyAccessToken() checks aud, one with no bearer authentication, or an application that uses the SDK only as a client, is reported without being exposed. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.
References
- CVE: CVE-2026-111771
- OWASP MCP Top 10: MCP07:2025 (Insufficient Authentication & Authorization), MCP04:2025 (Software Supply Chain Attacks & Dependency Tampering)
- OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse), ASI04 (Agentic Supply Chain Vulnerabilities)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-SUPPLY-08 (MCP-Specific Vuln)
- CSA AI Controls Matrix (AICM): IAM-01, IAM-16, STA-08
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-TSSDK-CVE-2026-111771-001.md: the page then shows that text, with the registry reference appended under it.