开发者生态
morning
让用户信任自己的 MCP 客户端,而不打开网络钓鱼漏洞
摘要
Stream Vessel / Blog Letting users trust their own MCP clients, without opening a phishing hole November 4, 2026 · Alexander Loginov · 10 min read The problem You run your own agent: a Slack bot, a se...
the
MCP
The
your
agent
you
server
and
own
OAuth
2026-11-05
1 阅读
约10分钟阅读
isalexlog
字号:
Stream Vessel / Blog Letting users trust their own MCP clients, without opening a phishing hole November 4, 2026 · Alexander Loginov · 10 min read The problem You run your own agent: a Slack bot, a service on a VPS, an MCP client you wrote over a weekend.您希望它位于您的文件中,这在 Stream Vessel 上意味着您自己的 S3 存储桶,代理可以通过 MCP 服务器在其中读取、写入和删除。代理使用 MCP 的标准 OAuth 登录:它自行注册,打开浏览器,单击“批准”,它会获得一个令牌。它在第一步失败。 At registration the agent named its redirect URI , the address your browser returns to after you approve, carrying a one-time authorization code the agent swaps for a token.你的是 https://agent.yourhost.example/callback ;答案是 invalid_redirect_uri 。服务器仅接受其运营商白名单上的地址:Claude、ChatGPT、Cursor、VS Code 等。添加您的意味着要求操作员更改配置文件。服务器不能简单地接受任何地址。该列表是邮局将把您的房屋钥匙递送到的地址。如果没有它,陌生人就会注册一个假“Claude”,并将密钥发送到他们的位置,并通过一个链接对您的存储进行网络钓鱼。因此,服务器要么对您关闭,要么对每个人都不安全。这两种失败都很常见。 On the closed side, this is what people run into: “The redirect URI is not allowed, the URL is not part of Atlassian whitelisted domains for registered MCP Clients.” — an error users, Cursor’s among them, reported in the Atlassian developer community “…each host application must have a registered GitHub App (or OAuth App) to authenticate on behalf of the user.” — GitHub MCP 服务器、政策和治理; otherwise you fall back to a personal access token On the open side, a May 2026 study that tested 119 OAuth-enabled MCP servers found registration endpoints on 114 of them, 95.8%, that “accept arbitrary redirect_uri values from anonymous requesters.”攻击:一个链接,一次点击,别人的存储桶假设您的服务器接受任何注册和任何重定向地址。 An attacker with no account on it can take over a user’s access in four steps: Register a client named “Claude” whose redirect URI is https://evil.example/cb .按照设计,开放注册是匿名的。向登录用户发送看起来正常的 /oauth/authorize 链接:“将您的存储重新连接到 Claude”。用户在您的真实域中的真实会话中看到您的真实同意屏幕,然后单击“批准”。代码位于villain.example。攻击者用它换取代币,现在就是用户。 PKCE 没有帮助:它只允许启动流程的客户端完成该流程,而攻击者则启动了该流程。客户的名字是自己声明的,不能证明什么。同意屏幕显示重定向主机,但 claude-connect.app 扫了一眼。这与发送给 Microsoft 365 用户的虚假应用程序批准提示相同:一个真实的页面和一个真实的批准;攻击者使用平台注册的应用程序,这里是服务器不应该接受的地址。用户确实批准了,但信息是虚假的。重定向允许列表使批准的含义与用户认为的含义相同:无论名称如何,密钥只能到达列表所示的位置。这不是假设。 In January 2026 Obsidian Security reported this chain against Square’s MCP server: self-registration accepted any redirect address, and one click exposed a merchant’s profile, transactions and bank details.用研究人员的话说,“任何之前授权过 Square MCP 服务器的用户都容易受到攻击。”他们指出,Square 的解决方案仅适用于新注册的客户。 Others found the same chain on an MCP proxy in front of a company’s single sign-on , worth a 24-hour access token and a 14-day refresh token per click, and across bug-bounty programs , where it was sometimes waved off as social engineering. SickSec 的答案是:受害者永远不会离开受信任的域。一个更安静的问题随之而来。当请求在其重定向地址被接受后检查失败时,错误将发送到该地址。因此,接受任何地址的服务器都是其自己域上的开放重定向器:精心设计的具有不良范围的授权链接会将访问者反弹到您的主机名下的任何站点。 RFC 9700 准确地描述了这种情况。规范的内容以及服务器实际执行的操作 MCP 规范命名了风险并将策略留给每个服务器。 Its security considerations say authorization servers MUST validate exact redirect URIs, SHOULD only redirect automatically to a URI they trust, and MAY instead inform the user and let them decide.最后两个是 RFC 9700 的句子,逐字逐句。 “信任”的含义
这篇文章对您有帮助吗?
订阅66必读
每日精选科技资讯,直达你的邮箱
相关推荐
存储库由新的官方 Heretic 社区维护
THIS REPOSITORY IS MAINTAINED BY THE NEW OFFICIAL HERETIC COMMUNITY. See #1 for
👁 0
★ 100.0
Jovial J73 编译器
A fully functional native compiler for JOVIAL J73 (MIL-STD-1589C), a programming
👁 0
★ 100.0
Show HN:Flide:使类似 Jev 的决策模型速度提高 9.5 倍
English · ç®€ä½“ä¸æ–‡ · 日本語 News · Quick start · Models · Options Fl
👁 0
★ 100.0
【IT之家开箱】华为鸿蒙一亿感恩有礼实体纪念章图赏:铜材质打造,纪念 HarmonyOS 里程碑时刻
IT之家 12 月 5 日消息,华为今天开启华为鸿蒙一亿感恩有礼实体纪念章领取活动,目前IT之家已收到了这款纪念徽章,接下来就给大家带来图赏。该纪念章外盒厚实,
👁 0
★ 100.0
90%绒子含量!海澜之家鹅绒羽绒服限时优惠
京东【海澜之家官方旗舰店】 海澜之家远红外鹅绒羽绒服,日常售价618元,今日可领取270元大额优惠券,叠加PLUS会员专属优惠,凑单到手价低至329元。 领券方
👁 0
★ 100.0