CVE-2026-55096 fast-mcp-telegram SSRF 漏洞
影响攻击者可读取服务器内网资源并外带数据
fast-mcp-telegram 是一个 Telegram MCP 服务器。其 send_message/send_message_to_phone 工具允许以 URL 列表形式传入文件,服务器会下载并作为 Telegram 附件发送。由于 SSRF 防护仅检查 URL 字面主机名而不做 DNS 解析,攻击者可绕过限制访问内网地址。
影响范围
fast-mcp-telegram 30.1 之前的版本;30.1 已修复。
漏洞详情
漏洞类型为服务端请求伪造(SSRF)。_validate_url_security 仅对 URL 中的主机名字符串做黑名单校验,不进行 DNS 解析,而实际请求时 httpx.AsyncClient.get 会自行解析域名。因此攻击者可构造解析到回环、私有或链路本地地址的主机名,绕过 block_private_ips=True 与 allow_http_urls=False 的安全默认配置。由于抓取内容会作为 Telegram 文件附件返回给攻击者,属于可完整读取并外带数据的非盲 SSRF。
利用条件与风险
利用需能调用 send_message/send_message_to_phone 工具并控制传入的 URL;实战中可导致内网服务探测与敏感数据外泄,风险较高。
修复建议
升级至 fast-mcp-telegram 30.1 或更高版本;临时缓解可限制该 MCP 工具的网络访问范围,或在网络层阻断服务器对内网地址的出站请求。
fast-mcp-telegram is a Telegram MCP Server. Prior to version 30.1, the send_message/send_message_to_phone MCP tools accept files as a list of http(s) URLs, which the server downloads and attaches to the outgoing Telegram message. Downloads are guarded by _validate_url_security, an SSRF denylist that checks the URL’s literal hostname string but never resolves DNS. The fetch (httpx.AsyncClient.get) does its own resolution at request time. Consequently a hostname that resolves to a loopback / private / link-local address passes the guard and is fetched — even with the secure defaults block_private_ips=True and allow_http_urls=False. Because the fetched body is returned to the attacker as a Telegram file attachment, this is a full-read, exfiltrating SSRF, not blind. This issue has been patched in version 30.1.