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

Abierto
#3,152 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
node.js, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
13.8k
Forks
2.5k
Merge medio
6 d 23 h
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de modelcontextprotocol/typescript-sdk

Todos los issues de modelcontextprotocol/typescript-sdk

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.