模型上下文协议(Model Context Protocol,MCP)已成为一种标准化接口,可实现大语言模型(Large Language Models,LLM)与外部数据源及工具之间的无缝集成。尽管MCP显著降低了开发复杂度并提升了智能体能力,但其开放性和可扩展性带来了严重安全漏洞,对系统可信度和用户数据保护构成威胁。本文系统分析了基于MCP的系统的安全格局,确定了三大主要威胁类别:(1)由协议设计缺陷引发的智能体劫持攻击;(2)MCP服务器中的传统Web漏洞;(3)供应链安全问题。为应对这些挑战,我们全面调研了现有防御策略,既考察了主动式服务器端扫描方法(涵盖分层检测流水线、智能体审计框架到零信任注册系统),也研究了可提供持续监督和策略执行的运行时交互监控方案。我们的分析表明,MCP安全本质上代表了一种范式转变,其攻击面从传统的代码执行扩展到自然语言元数据的语义解释,因此需要针对这一独特威胁模型设计新型防御机制。
英文摘要:
The Model Context Protocol (MCP) has emerged as a standardized interface enabling seamless integration between Large Language Models (LLMs) and external data sources and tools. While MCP significantly reduces development complexity and enhances agent capabilities, its openness and extensibility introduce critical security vulnerabilities that threaten system trustworthiness and user data protection. This paper systematically analyzes the security landscape of MCP-based systems, identifying three principal threat categories: (1) agent hijacking attacks stemming from protocol design deficiencies; (2) traditional web vulnerabilities in MCP servers; and (3) supply chain security. To address these challenges, we comprehensively survey existing defense strategies, examining both proactive server-side scanning approaches, ranging from layered detection pipelines and agentic auditing frameworks to zero-trust registry systems, and runtime interaction monitoring solutions that provide continuous oversight and policy enforcement. Our analysis reveals that MCP security fundamentally represents a paradigm shift where the attack surface extends from traditional code execution to semantic interpretation of natural language metadata, necessitating novel defense mechanisms tailored to this unique threat model.
Breaking the Protocol: Security Analysis of the Model Context Protocol Specification and Prompt Injection Vulnerabilities in Tool-Integrated LLM Agents
Give Them an Inch and They Will Take a Mile:Understanding and Measuring Caller Identity Confusion in MCP-Based AI Systems
Institute for Clarity in Documentation(清晰文档研究所);Inria Paris-Rocquencourt(巴黎-罗克Quantin 研究院);Rajiv Gandhi University(拉朱·甘地大学);Tsinghua University(清华大学);Palmer Research Laboratories(帕勒尔研究实验室);Shandong University(山东省大学);City University of Hong Kong(香港城市大学)
MCPEvol-Bench: Benchmarking LLM Agent Performance Across Dynamic Evolutions of MCP Servers
College of Computer Science and Technology, National University of Defense Technology(国防科技大学计算机科学与技术学院);State Key Laboratory of Complex & Critical Software Environment(复杂关键软件环境国家重点实验室);National Key Laboratory of Parallel and Distributed Computing(并行与分布式计算国家重点实验室)
MCP-SafetyBench: A Benchmark for Safety Evaluation of Large Language Models with Real-World MCP Servers
East China Normal University(东华师范大学);Salesforce AI Research(Salesforce人工智能研究);Singapore Management University(新加坡国立大学);Shanghai AI Laboratory(上海人工智能实验室)
MCPXKIT: The Unified Toolkit for Analyzing Model Context Protocol Security
Shenzhen International Graduate School, Tsinghua University, Shenzhen, China(深圳国际研究生院,清华大学,深圳,中国);Ant Group, Hangzhou, China(蚂蚁集团,杭州,中国);Swinburne University of Technology, Melbourne, Australia(斯威本科技大学,墨尔本,澳大利亚);The University of Adelaide, Adelaide, Australia(阿德莱德大学,阿德莱德,澳大利亚);UNSW Sydney, Australia(悉尼大学,澳大利亚)
A Taxonomy of Runtime Faults in Model Context Protocol Servers
Jheronimus Academy of Data Science and Tilburg University(赫伦尼姆数据科学学院和蒂尔堡大学);Jheronimus Academy of Data Science(赫伦尼姆数据科学学院);University of Sannio(萨尼亚大学);University of Luxembourg(卢森堡大学);University of Naples Federico II(那不勒斯费德里科二世大学)
ETDI: Mitigating Tool Squatting and Rug Pull Attacks in Model Context Protocol (MCP) by using OAuth-Enhanced Tool Definitions and Policy-Based Access Control
Amazon Independent Researcher(亚马逊独立研究者);Project Kuiper Security (KPES)(项目Kuiper安全);Proactive Security OWASP, Amazon Web Services(主动安全OWASP,亚马逊网络服务);Intuit Adversarial AI Security reSearch (A2RS)(Intuit对抗AI安全reSearch)
本文提出 ETDI 安全扩展,通过密码学身份验证、不可变版本化工具定义、OAuth 2.0 权限管理及基于策略的细粒度访问控制,缓解 MCP 中的工具投毒和 Rug Pull 攻击,构建更安全可控的 AI 工具交互生态。
When the Manual Lies: A Realistic Benchmark to Evaluate MCP Poisoning Attacks for LLM Agents
Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences, Beijing, China(中国科学院大学网络安全学院)
Systematization of Knowledge: Security and Safety in the Model Context Protocol Ecosystem
Tribhuvan University(特里布文大学);University of North Dakota(北达科他大学);Youngstown State University(亚当斯州立大学);University of Missouri(密苏里大学);University of Toledo(托莱多大学)
Bypassing Document Ingestion: An MCP Approach to Financial Q&A
University of Groningen(Groningen大学);Goethe University Frankfurt(法兰克福歌德大学);Martin Luther University Halle-Wittenberg(哈雷-维滕贝格马丁路德大学);Halle Institute for Economic Research (IWH)(哈雷经济研究所)
VIPER-MCP: Detecting and Exploiting Taint-Style Vulnerabilities in Model Context Protocol Servers
The State Key Laboratory of Blockchain and Data Security, Zhejiang University(浙江大学区块链与数据安全国家重点实验室);Beijing University of Posts and Telecommunications(北京邮电大学);Lanzhou University(兰州大学)