Descrizione
The Model Context Protocol TypeScript SDK provides TypeScript client and server implementations of the Model Context Protocol. From 1.6.0 until 1.32.0 in @modelcontextprotocol/sdk, from 2.0.0 until 2.3.0 in @modelcontextprotocol/server, from 2.0.0 until 2.0.2 in @modelcontextprotocol/express, and from 2.0.0 until 2.3.1 in @modelcontextprotocol/server-legacy, server-side bearer authentication could accept a valid access token issued for a different service because the SDK did not enforce the token audience. The affected surface is server-side HTTP bearer authentication. The trigger is a valid token whose audience names another service. The authorization server must issue tokens for multiple services, and the application's verifyAccessToken() must not independently validate aud. Applications already validating aud inside verifyAccessToken() are not affected. An attacker with a token for another service could authenticate to the MCP server and obtain the confidentiality and integrity capabilities granted to an authenticated caller. Upgrading alone leaves the new audience validation disabled. Operators must enable audience validation and provide the token audience together. Enabling only the expected audience check causes every request to receive HTTP 401. This issue is fixed in @modelcontextprotocol/sdk 1.32.0, @modelcontextprotocol/server 2.3.0, @modelcontextprotocol/express 2.0.2, and @modelcontextprotocol/server-legacy 2.3.1.
Come correggere
Priorità: Bassa — correggere con la manutenzione ordinaria. Motivazione: CVSS 6.8, EPSS 0.5% (percentile 46).
Versioni da aggiornare
Il record non riporta ancora i prodotti e le versioni corrette (analisi NVD in corso). Consultare l'advisory del vendor nei riferimenti.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Restringere l'accesso al componente, applicare il principio del minimo privilegio e controllare i log per operazioni non autorizzate.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Riferimenti
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/commit/40f8f4e229d963cd7fd2890bda2aeebe7005299a
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/commit/5a0724d14cf34a27a3b070224d2996cdd611df9f
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/commit/5a1867390b91b8836f49af76c45427279f513325
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/pull/2929
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/pull/2930
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/pull/2952
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/releases/tag/1.32.0
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/releases/tag/@modelcontextprotocol/express@2.0.2
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/releases/tag/@modelcontextprotocol/server-legacy@2.3.1
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/releases/tag/@modelcontextprotocol/server@2.3.0
- Riferimentohttps://github.com/modelcontextprotocol/typescript-sdk/security/advisories/GHSA-rvq5-wwqv-78pq