arXiv:2601.17549cs.CRcs.AI2026-01被引 27

首次揭示MCP协议三大安全漏洞,提出可落地的加固方案。

Breaking the Protocol: Security Analysis of the Model Context Protocol Specification and Prompt Injection Vulnerabilities in Tool-Integrated LLM Agents

  • 分析MCP协议架构,发现权限声明、指令注入和信任传播三类漏洞。
  • 实测攻击成功率提升23%至41%,暴露协议设计缺陷。
  • 提出兼容性修复方案,使成功率降至12.4%,延迟仅增加8.3ms。

Model Context Protocol(MCP)已成为大模型与外部工具集成的行业标准,但其协议规范尚无正式安全分析。本文首次对MCP架构设计进行严格安全评估,识别出三大基础性协议层漏洞:(1) 缺乏能力证明机制,导致服务器可任意声明权限;(2) 双向采样无来源认证,引发服务端提示注入;(3) 多服务器配置中隐式信任传播。我们构建了 extsc{MCPBench}框架,连接现有代理安全基准与MCP兼容基础设施,实现对协议特异性攻击面的直接度量。在5个MCP服务器实现上,针对847个攻击场景的受控实验表明,MCP的架构选择使攻击成功率相比等效非MCP集成提高23%至41%。我们提出 extsc{MCPSec}协议扩展,通过引入能力证明与消息认证,在保持向后兼容的前提下,将攻击成功率从52.8%降至12.4%,单条消息平均延迟增加8.3ms。研究证实,MCP的安全缺陷源于协议设计而非实现问题,需在协议层面修复。

原文摘要 · Abstract (English)

The Model Context Protocol (MCP) has emerged as a de facto standard for integrating Large Language Models with external tools, yet no formal security analysis of the protocol specification exists. We present the first rigorous security analysis of MCP's architectural design, identifying three fundamental protocol-level vulnerabilities: (1) absence of capability attestation allowing servers to claim arbitrary permissions, (2) bidirectional sampling without origin authentication enabling server-side prompt injection, and (3) implicit trust propagation in multi-server configurations. We implement \textsc{MCPBench}, a novel framework bridging existing agent security benchmarks to MCP-compliant infrastructure, enabling direct measurement of protocol-specific attack surfaces. Through controlled experiments on 847 attack scenarios across five MCP server implementations, we demonstrate that MCP's architectural choices amplify attack success rates by 23--41\% compared to equivalent non-MCP integrations. We propose \textsc{MCPSec}, a backward-compatible protocol extension adding capability attestation and message authentication, reducing attack success rates from 52.8\% to 12.4\% with median latency overhead of 8.3ms per message. Our findings establish that MCP's security weaknesses are architectural rather than implementation-specific, requiring protocol-level remediation.

协议安全LLM代理提示注入

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。