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

Offen
#3,152 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
38/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
node.js, typescript

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
13.8k
Forks
2.5k
Ø Merge
6 T. 23 Std.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus modelcontextprotocol/typescript-sdk

Alle Issues in modelcontextprotocol/typescript-sdk

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.