Security best practices: SSRF section does not cover local stdio-to-HTTP bridges acting as OAuth clients
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 42/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- markdown
调研方向
The change goes in docs/docs/draft/tutorials/security/security_best_practices.mdx, directly after the "DNS Resolution Considerations" subsection and before "SSRF Against Authorization Servers". Read the existing SSRF mitigations first, since the proposed text refers back to them. Done means the subsection is inserted as written, or revised with maintainers, and the docs build still renders. The issue is open with no comments, and the wording itself is a policy decision, so confirm scope with a maintainer before editing.
由索引模型根据 Issue 内容生成。
描述
What's broken?
The spec doesn't cover a case it clearly should
Where in the spec or docs?
Security Best Practices, section "Server-Side Request Forgery (SSRF)". Source file: docs/docs/draft/tutorials/security/security_best_practices.mdx. The spot is the end of "DNS Resolution Considerations", right before "SSRF Against Authorization Servers".
What should happen?
The SSRF section should name the local stdio-to-HTTP bridge as a client that runs OAuth discovery on the user's machine. It should say that the section's mitigations apply to it. Proposed subsection below, ready to drop in after "DNS Resolution Considerations". It is 34 lines; nothing existing changes.
#### Local Bridges Acting as Clients
A local bridge that turns a stdio connection into Streamable HTTP runs
the whole OAuth client role on the user's machine. The client in this
section is then the bridge rather than the application the user sees. The
bridge reads `WWW-Authenticate` and fetches the protected resource
metadata. It picks an authorization server from `authorization_servers`.
Then it sends the token request to the `token_endpoint` named in that
server's metadata. The remote server controls each of those values. The bridge makes the requests from inside the user's network.
The mitigations above are written for clients deployed to a server. A
bridge on a laptop or a CI runner needs the same mitigations. The
reachable targets differ in two ways. Loopback and link-local addresses are now
the user's own services and, on a cloud-hosted development machine, the
instance metadata endpoint. A bridge is also usually started from a host
application's configuration, so the user never sees the URLs it was sent
to.
**Bridge Authors**
Bridge authors **SHOULD**:
- Apply the HTTPS, private-range and redirect checks of this section
before every discovery fetch and before the token request
- Record the destinations they chose where the user can inspect them
**Hosts That Launch a Bridge**
Hosts that start a bridge from their own configuration flows **SHOULD**:
- Pin it to a reviewed version
- Prefer a native remote transport where they have one, so that the host
itself performs the client-side validation
What actually happens?
The mitigation text reads: "MCP clients deployed to a server MUST consider SSRF risks and implement appropriate mitigations when fetching OAuth-related URLs." A local stdio-to-HTTP bridge runs that same discovery from the user's machine, and nothing in that setup is deployed to a server. It takes resource_metadata, authorization_servers and the token endpoint from the remote server and then sends its requests wherever they point, including the token request. The page does not cover that case. Host applications start such bridges from their configuration flows, for users who never see those URLs.
Anything else?
Why I think it is needed. Five CVE records exist for one such bridge, mcp-remote on npm: CVE-2026-51994, -51995, -51996, -51997 and -52001. MITRE published them on 24 September 2026; the CNA text gives 0.1.16 through 0.1.38 as affected. I reported them. On 15 October I ran the current release, 0.15.1, against loopback canaries with the procedure in my research record. It still followed the server-selected discovery paths of the first two records. Evidence, procedures and limits: https://github.com/playb0t/mcp-remote-oauth-security.
On the channel: the repository lets only collaborators open pull requests at the moment, so this comes as a documentation issue with the text inline. If a maintainer prefers it as a PR, I will open one the moment a fork is allowed to. Happy to move it under another heading or trim it if the docs team prefers a shorter note.
AI disclosure: I drafted this with AI assistance (Claude Code) from my own research notes and reviewed every sentence; the evidence and the rationale are mine.
- 主要语言
- TypeScript
- 星标
- 9.8k
- 派生
- 1.9k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 73
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/modelcontextprotocol 的其他 Issue
-
docs: add Gravitee Access Management to the Enterprise-Managed Authorization implementation table未关闭bug
难度 1/5 1 小时以内 新手友好度 85/100
modelcontextprotocol/modelcontextprotocol#3583 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 72/100
modelcontextprotocol/modelcontextprotocol#3581 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
modelcontextprotocol/modelcontextprotocol#3571 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
modelcontextprotocol/modelcontextprotocol#3554 ·
维护者通常 1 天内回复
-
Sampling with tools: two small corrections可能重新可做 @AbarnaaSree 于 19 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
modelcontextprotocol/modelcontextprotocol#3490 · 2 条评论 ·
维护者通常 1 天内回复
查看 modelcontextprotocol/modelcontextprotocol 的全部 Issue
相似的 Issue
-
bug
难度 2/5 半天 新手友好度 62/100
garethgeorge/backrest#1451 ·
维护者通常 1 天内回复
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument order可能已有人在做 @ManyaS-Git 于 1 天前认领。 未关闭status:in-linear
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 13 天内回复
-
bug
难度 2/5 半天 新手友好度 68/100
navikt/skjemabygging-formio#2399 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
lidofinance/validator-ejector#233 ·
维护者通常 1 天内回复