MCP TypeScript SDK: Server bearer authentication accepted tokens issued for another service
### Summary In affected versions, the SDK's server-side bearer authentication had no way to check that a token was issued for your server (its audience). Where one authorization server issues tokens for several services, a valid token for another service was also accepted by your MCP server. ### Am I affected? Yes, if your HTTP server uses `requireBearerAuth()` or `verifyBearerToken()`, its authorization server also issues tokens for other services, and your `verifyAccessToken()` does not check the token's audience (`aud`) itself. Affected versions: - `@modelcontextprotocol/sdk` 1.6.0 through 1.31.0 - `@modelcontextprotocol/server` 2.0.0 through 2.2.0 - `@modelcontextprotocol/express` 2.0.0 through 2.0.1 - `@modelcontextprotocol/server-legacy` 2.0.0 through 2.3.0 ### Fix Upgrade to: - 1.x: `@modelcontextprotocol/sdk` 1.32.0 or later - 2.x: `@modelcontextprotocol/server` 2.3.0 or later, together with `@modelcontextprotocol/express` 2.0.2 or later if you use it - `@modelcontextprotocol/server-legacy` 2.3.1 or later **Upgrading alone changes nothing.** The patched versions add an `expectedResource` setting that is off by default. To turn the check on, make both of these changes together: 1. Pass the audience your authorization server puts in tokens for your server: `requireBearerAuth({ verifier, expectedResource: new URL('https://mcp.example.com/mcp') })`. 2. Return the token's audience from `verifyAccessToken()` as `AuthInfo.resource`, also a `URL`. A token for another service
- Products
- @modelcontextprotocol/express, @modelcontextprotocol/sdk, @modelcontextprotocol/server, @modelcontextprotocol/server-legacy
- Affected versions
- Not specified
- Fixed versions
- 1.32.0, 2.0.2, 2.3.0, 2.3.1
- CVEs
- CVE-2026-111771
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 13:20 UTC · Revision 1
Source evidence
MCP TypeScript SDK: Server bearer authentication accepted tokens issued for another service
core-osv · Original sourcePublished 20 Oct 2026, 19:43 UTC
### Summary In affected versions, the SDK's server-side bearer authentication had no way to check that a token was issued for your server (its audience). Where one authorization server issues tokens for several services, a valid token for another service was also accepted by your MCP server. ### Am I affected? Yes, if your HTTP server uses `requireBearerAuth()` or `verifyBearerToken()`, its authorization server also issues tokens for other services, and your `verifyAccessToken()` does not check the token's audience (`aud`) itself. Affected versions: - `@modelcontextprotocol/sdk` 1.6.0 through 1.31.0 - `@modelcontextprotocol/server` 2.0.0 through 2.2.0 - `@modelcontextprotocol/express` 2.0.0 through 2.0.1 - `@modelcontextprotocol/server-legacy` 2.0.0 through 2.3.0 ### Fix Upgrade to: - 1.x: `@modelcontextprotocol/sdk` 1.32.0 or later - 2.x: `@modelcontextprotocol/server` 2.3.0 or later, together with `@modelcontextprotocol/express` 2.0.2 or later if you use it - `@modelcontextprotocol/server-legacy` 2.3.1 or later **Upgrading alone changes nothing.** The patched versions add an `expectedResource` setting that is off by default. To turn the check on, make both of these changes together: 1. Pass the audience your authorization server puts in tokens for your server: `requireBearerAuth({ verifier, expectedResource: new URL('https://mcp.example.com/mcp') })`. 2. Return the token's audience from `verifyAccessToken()` as `AuthInfo.resource`, also a `URL`. A token for another service
osv:GHSA-rvq5-wwqv-78pq
@modelcontextprotocol/sdk
Fixed versions: 1.32.0
@modelcontextprotocol/server
Fixed versions: 2.3.0
@modelcontextprotocol/express
Fixed versions: 2.0.2
@modelcontextprotocol/server-legacy
Fixed versions: 2.3.1
Complete source record
{
"id": "fa4d7a7bd822a2c6314f6fa2f46f99df8a387e2cc5f91cd85c3540ee0d14eab7",
"url": "https://osv.dev/vulnerability/GHSA-rvq5-wwqv-78pq",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "MCP TypeScript SDK: Server bearer authentication accepted tokens issued for another service",
"summary": "### Summary In affected versions, the SDK's server-side bearer authentication had no way to check that a token was issued for your server (its audience). Where one authorization server issues tokens for several services, a valid token for another service was also accepted by your MCP server. ### Am I affected? Yes, if your HTTP server uses `requireBearerAuth()` or `verifyBearerToken()`, its authorization server also issues tokens for other services, and your `verifyAccessToken()` does not check the token's audience (`aud`) itself. Affected versions: - `@modelcontextprotocol/sdk` 1.6.0 through 1.31.0 - `@modelcontextprotocol/server` 2.0.0 through 2.2.0 - `@modelcontextprotocol/express` 2.0.0 through 2.0.1 - `@modelcontextprotocol/server-legacy` 2.0.0 through 2.3.0 ### Fix Upgrade to: - 1.x: `@modelcontextprotocol/sdk` 1.32.0 or later - 2.x: `@modelcontextprotocol/server` 2.3.0 or later, together with `@modelcontextprotocol/express` 2.0.2 or later if you use it - `@modelcontextprotocol/server-legacy` 2.3.1 or later **Upgrading alone changes nothing.** The patched versions add an `expectedResource` setting that is off by default. To turn the check on, make both of these changes together: 1. Pass the audience your authorization server puts in tokens for your server: `requireBearerAuth({ verifier, expectedResource: new URL('https://mcp.example.com/mcp') })`. 2. Return the token's audience from `verifyAccessToken()` as `AuthInfo.resource`, also a `URL`. A token for another service ",
"evidence": "osv:GHSA-rvq5-wwqv-78pq",
"products": [
{
"name": {
"value": "@modelcontextprotocol/sdk",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.32.0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "@modelcontextprotocol/server",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.3.0",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "@modelcontextprotocol/express",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.0.2",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "@modelcontextprotocol/server-legacy",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.3.1",
"evidence": "/affected/3/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "GHSA-rvq5-wwqv-78pq",
"aliases": [
"CVE-2026-111771",
"GHSA-rvq5-wwqv-78pq"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "1.6.0"
},
{
"fixed": "1.32.0"
}
]
}
],
"package": {
"name": "@modelcontextprotocol/sdk",
"purl": "pkg:npm/%40modelcontextprotocol/sdk",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rvq5-wwqv-78pq/GHSA-rvq5-wwqv-78pq.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.3.0"
}
]
}
],
"package": {
"name": "@modelcontextprotocol/server",
"purl": "pkg:npm/%40modelcontextprotocol/server",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rvq5-wwqv-78pq/GHSA-rvq5-wwqv-78pq.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.0.2"
}
]
}
],
"package": {
"name": "@modelcontextprotocol/express",
"purl": "pkg:npm/%40modelcontextprotocol/express",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rvq5-wwqv-78pq/GHSA-rvq5-wwqv-78pq.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.3.1"
}
]
}
],
"package": {
"name": "@modelcontextprotocol/server-legacy",
"purl": "pkg:npm/%40modelcontextprotocol/server-legacy",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-rvq5-wwqv-78pq/GHSA-rvq5-wwqv-78pq.json"
}
}
],
"modified": "2026-10-20T20:00:04.595309934Z",
"provider": "osv",
"references": [
"https://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-rvq5-wwqv-78pq",
"https://github.com/modelcontextprotocol/typescript-sdk/commit/40f8f4e229d963cd7fd2890bda2aeebe7005299a",
"https://github.com/modelcontextprotocol/typescript-sdk/commit/5a0724d14cf34a27a3b070224d2996cdd611df9f",
"https://github.com/modelcontextprotocol/typescript-sdk/commit/5a1867390b91b8836f49af76c45427279f513325",
"https://github.com/modelcontextprotocol/typescript-sdk"
],
"provider_metadata": {
"cwe_ids": [
"CWE-863"
],
"severity": "MODERATE",
"github_reviewed": true,
"nvd_published_at": null,
"github_reviewed_at": "2026-10-20T19:43:36Z"
}
},
"related_cves": [
{
"value": "CVE-2026-111771",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 390361,
"published_at": "2026-10-20T19:43:36+00:00"
}