1.32.2 does not reject authorization-server metadata whose issuer does not echo the discovery URL (RFC 8414 section 3.3)

Aperta
#3,152 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, typescript

Direzione di ricerca

Read the authorization server metadata discovery code and the source comment noted in the issue, then trace how the discovered issuer and token endpoint are used. Reproduce the matching and mismatched issuer cases against a local decoy and compare whether the client proceeds to POST /token. The issue asks maintainers to decide whether to add issuer validation with an opt-out or accept the behavior for the remaining v1 lifetime.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

v1

The client sets issuer = String(authorizationServerUrl), and a source comment states metadata.issuer is deliberately not used and that this version does not verify the metadata document echoes the URL it was fetched from. So I'm not reporting this as an undisclosed issue. I'm raising it because the user-visible consequence and a reproduction are worth having on record, and because two other MCP clients behave differently.

RFC 8414 section 3.3 says the issuer returned must be identical to the issuer identifier the well-known URI was constructed from, otherwise the metadata MUST NOT be used.

Against a decoy authorization server advertising a foreign issuer, 1.32.2 proceeds and POSTs to /token with an Authorization header.

The Python MCP SDK 1.30.0 refuses at validate_metadata_issuer, citing RFC 8414 section 3.3 and SEP-2468, with zero token-endpoint hits. In consistent mode, where the advertised issuer matches, it completes the flow to /token as a control, so the empty capture in mismatched mode is a refusal rather than a harness that never arrives.

Scope, stated narrowly: when the client was handed one URL and that origin controls both the metadata and the token endpoint, the issuer field is another field that origin controls anyway. The gap matters where discovery is not fully under the control of the party named in the document, such as an open redirect on the well-known path, a stale or cached document, or a resource server influencing discovery that is not the authorization server.

This is separate from the credential-binding class in GHSA-6qxp-vccf-f47h and the fastmcp advisory. Different layer, different fix.

Question: is this still acceptable for the remaining v1 lifetime, or would you take the check with an opt-out? Either answer closes it for me, I'd just like the decision recorded.

Reproduction: two runs against a local decoy, matching and mismatched issuer, on 1.32.2 under Node, harness available on request.

Lingua principale
TypeScript
Stelle
13.8k
Fork
2.5k
Merge medio
6g 23h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di modelcontextprotocol/typescript-sdk

Tutte le issue di modelcontextprotocol/typescript-sdk

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.