流式安全:揭示MCP生态系统中的双向数据流风险
Unsafe by Flow: Uncovering Bidirectional Data-Flow Risks in MCP Ecosystem
AI总结:
本文提出MCP-BiFlow框架,通过双向静态分析检测MCP接口中的数据流安全风险,准确识别30个已知漏洞,优于现有工具。
摘要:
模型上下文协议(MCP)已成为LLM代理与外部工具交互的接口层,但其引入了现有分析工具难以处理的不安全数据流。漏洞表现为请求方控制的参数可能传播至敏感操作,而不可信的外部或敏感内部数据可能通过MCP可见输出影响主机或模型行为。MCP-BiFlow框架通过MCP感知的入口点恢复、协议特定的污点建模和跨过程传播分析,针对32个确认的MCP漏洞案例检测出30个(93.8%召回率),在15,452个真实MCP服务器仓库中发现549个重叠压缩候选簇,手动审查确认87台服务器中的118个漏洞路径,揭示了缺乏协议感知的双向流恢复导致的持续性安全问题。
英文摘要:
Model Context Protocol (MCP) have quickly become the interface layer between LLM agents and external tools, yet they also introduce unsafe data flows that existing analyzers handle poorly. Vulnerabilities manifest in two directions: requester-controlled arguments may propagate to sensitive operations, while untrusted external or sensitive internal data may surface through MCP-visible outputs and subsequently influence host or model behavior. Accurate detection is complicated by the heterogeneous registration and dispatch patterns MCP servers employ, the need for MCP-specific taint semantics, and the fact that bugs often only materialize along complete tool-scoped execution paths. We present MCP-BiFlow, a bidirectional static analysis framework built around MCP-aware entrypoint recovery, protocol-specific taint modeling, and interprocedural propagation analysis. Against a benchmark of 32 confirmed MCP vulnerability cases, MCP-BiFlow identifies 30 (93.8% recall), substantially outperforming CodeQL, Semgrep, Snyk Code, and MCPScan. Across 15,452 real-world MCP server repositories, MCP-BiFlow surfaces 549 overlap-compressed candidate clusters; manual review confirms 118 vulnerability paths in 87 servers, establishing unsafe propagation as a recurring failure mode that resists detection without protocol-aware recovery of both request-side and return-side flows.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。