use-mcp OAuth2漏洞分析:XSS导致客户端代码执行

本文详细分析了use-mcp库OAuth2流程中的安全漏洞,攻击者可通过恶意MCP服务器提供的未验证数据实施XSS攻击,最终实现客户端代码执行。研究人员因此获得550美元奖励。

Cloudflare公共漏洞赏金 | 报告 #3211031 - use-mcp的OAuth2流程使用window.open调用未经验证的MCP服务器数据导致代码执行

漏洞概要

use-mcp库的authorizeEndpoint参数存在XSS漏洞。该参数在use-mcp 0.0.10版本中已添加了净化处理。技术娴熟的黑客能够将此XSS漏洞转化为客户端代码执行(参考:https://verialabs.com/blog/from-mcp-to-shell/#xss—rce-abusing-mcps-stdio-transport)。

研究人员因此发现获得了550美元奖励。

时间线

  • 2025年6月19日 17:24 UTC - null_smashmaster0045向Cloudflare公共漏洞赏金计划提交报告
  • 2025年6月19日 17:32 UTC - null_smashmaster0045发表评论
  • 2025年6月24日 10:30 UTC - HackerOne分析员mario发表评论
  • 2025年6月24日 10:39 UTC - HackerOne分析员mario发表评论
  • 2025年6月25日 12:13 UTC - HackerOne分析员mario将状态改为"已分类"
  • 2025年6月25日 12:33 UTC - Cloudflare公共漏洞赏金向null_smashmaster0045支付550美元赏金
  • 2025年6月30日 21:23 UTC - HackerOne分析员andrew发表评论
  • 2025年6月30日 23:02 UTC - null_smashmaster0045发表评论
  • 2025年7月1日 09:48 UTC - HackerOne分析员andrew发表评论
  • 2025年8月16日 21:40 UTC - null_smashmaster0045发表评论
  • 2025年8月18日 17:27 UTC - Cloudflare员工3shna发表评论
  • 2025年8月18日 17:28 UTC - Cloudflare员工3shna将状态改为"已分类"
  • 2025年8月18日 17:30 UTC - Cloudflare员工3shna关闭报告并将状态改为"已解决"
  • 2025年8月19日 00:45 UTC - null_smashmaster0045请求公开此报告
  • 2025年9月12日 19:49 UTC - null_smashmaster0045发表评论
  • 14天前 - null_smashmaster0045发表评论
  • 8天前 - null_smashmaster0045发表评论
  • 2天前 - Cloudflare员工mschwarzl发表评论
  • 1天前 - null_smashmaster0045发表评论
  • 20小时前 - Cloudflare员工mschwarzl发表评论
  • 19小时前 - null_smashmaster0045发表评论
  • 19小时前 - Cloudflare员工mschwarzl同意公开此报告
  • 19小时前 - 此报告已被公开

报告详情

  • 报告时间:2025年6月19日 17:24 UTC
  • 报告者:null_smashmaster0045
  • 报告对象:Cloudflare公共漏洞赏金计划
  • 报告ID:#3211031
  • 状态:已解决
  • 严重程度:中等(4 ~ 6.9)
  • 公开时间:2025年9月30日 08:15 UTC
  • 漏洞类型:跨站脚本攻击(XSS)- 通用型
  • CVE ID:无
  • 赏金:550美元
  • 账户详情:无
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计