Parasites in the Toolchain: A Large-Scale Analysis of Attacks on the MCP Ecosystem
Shuli Zhao, Qinsheng Hou, Zihan Zhan, Yanhao Wang, Yuchong Xie, Yu Guo, Libo Chen, Shenghong Li, Zhi Xue
Abstract
Large language models (LLMs) are increasingly integrated with external systems through the Model Context Protocol (MCP), which standardizes tool invocation and has rapidly become a backbone for LLM-powered applications. While this paradigm enhances functionality, it also introduces a fundamental security shift: LLMs transition from passive information processors to autonomous orchestrators of taskoriented toolchains, expanding the attack surface, elevating adversarial goals from manipulating single outputs to hijacking entire execution flows. In this paper, we identify and characterize a systematic privacy-leakage attack pattern, termed Parasitic Toolchain Attacks, instantiated as MCP Unintended Privacy Disclosure (MCP-UPD). These attacks require no direct victim interaction; instead, adversaries embed malicious instructions into external data sources that LLMs access during legitimate tasks. Unlike traditional prompt injection and tool poisoning attacks, our attack targets the interconnected toolchain itself, assembling multiple legitimate tools into a coordinated workflow whose combined behavior accomplishes malicious objectives. In MCP-UPD, the malicious logic infiltrates the toolchain and unfolds in three phases: Parasitic Ingestion, Privacy Collection, and Privacy Disclosure, culminating in stealthy exfiltration of private data. Our root cause analysis reveals that MCP lacks both context-tool isolation and least-privilege enforcement, enabling adversarial instructions to propagate unchecked into sensitive tool invocations. To assess the severity, we design MCP-SEC and conduct the first large-scale security census of the MCP ecosystem, analyzing 12,230 tools across 1,360 servers. Our findings show that the MCP ecosystem is rife with real-world exploitable gadgets and diverse attack methods, underscoring systemic risks in MCP platforms and the urgent need for defense mechanisms in LLM-integrated environments.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
Cited by top-tier papers2
- Red-Teaming Coding Agents from a Tool-Invocation Perspective: An Empirical Security AssessmentYuchong Xie, Mingyu Luo, Zesen Liu, Zhixiang Zhang et al.ISSTA 2026
- SOPE: Situation-Aware and Statistically Indistinguishable Privacy Exfiltration for MCP-enabled AgentsRuixiao Lin, Qingming Li, Jiahao Chen, Chunyi Zhou et al.ICML 2026
Builds on15
- Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code GenerationJiawei Liu, Chunqiu Steven Xia, Yuyao Wang, Lingming ZhangNeurIPS 2023 · 2,317 citations
- Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought PromptingMiles Turpin, Julian Michael, Ethan Perez, Samuel R. BowmanNeurIPS 2023 · 1,792 citations
- Gorilla: Large Language Model Connected with Massive APIsShishir G. Patil, Tianjun Zhang, Xin Wang, Joseph E. GonzalezNeurIPS 2024 · 1,715 citations
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language ModelsSamuel Gehman, Suchin Gururangan, Maarten Sap, Yejin Choi et al.EMNLP Findings 2020 · 692 citations
- Towards Mitigating LLM Hallucination via Self ReflectionZiwei Ji, Tiezheng Yu, Yan Xu, Nayeon Lee et al.EMNLP Findings 2023 · 274 citations
Related papers
- MCP-Guard: A Multi-Stage Defense-in-Depth Framework for Securing Model Context Protocol in Agentic AIWenpeng Xing, Zhonghao Qi, Yupeng Qin, Yilin Li et al.ACL Findings 2026 · 2 citations
- Invisible Prompts, Visible Threats: Malicious Font Injection in External Resources for Large Language ModelsJunjie Xiong, Changjia Zhu, Shuhang Lin, Chong Zhang et al.EMNLP Findings 2025 · 5 citations
- MCP Security Bench (MSB): Benchmarking Attacks Against Model Context Protocol in LLM AgentsDongsen Zhang, Zekun Li, Xu Luo, Xuannan Liu et al.ICLR 2026 · 47 citations
- MCPTox: A Benchmark for Tool Poisoning on Real-World MCP ServersZhiqiang Wang, Yichao Gao, Yanting Wang, Suyuan Liu et al.AAAI 2026 · 6 citations
- MPMA: Preference Manipulation Attack Against Model Context ProtocolZihan Wang, Rui Zhang, Yu Liu, Wenshu Fan et al.AAAI 2026 · 29 citations
