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

未關閉
#3,152 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
38/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
node.js, typescript

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
TypeScript
星號
13.8k
分支
2.5k
平均合併
6 天 23 小時
30 天內合併 PR
2

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

modelcontextprotocol/typescript-sdk 的其他 Issue

查看 modelcontextprotocol/typescript-sdk 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。