← Back to Paper List

Compatibility at a Cost: Systematic Discovery and Exploitation of MCP Clause-Compliance Vulnerabilities

Nanzi Yang, Weiheng Bai, Kangjie Lu
arXiv (2026)
Agent Benchmark

📝 Paper Summary

AI Agent Security Protocol Interoperability
The Model Context Protocol's reliance on optional clauses for compatibility creates implementation gaps in SDKs that attackers can systematically exploit for silent prompt injection and DoS.
Core Problem
To support diverse agents, the MCP specification makes 78.5% of its clauses optional, leading SDK developers to omit critical security guardrails (like change notifications) in their implementations.
Why it matters:
  • Missing guardrails allow malicious servers to manipulate agent context without detection (silent prompt injection)
  • Inconsistent enforcement across languages creates a fragmented security landscape for the growing MCP ecosystem
  • Existing scanners rely on hard-coded templates and cannot detect logic bugs rooted in protocol non-compliance
Concrete Example: The Python MCP SDK omits the optional `listChanged` notification. A malicious server can silently modify tool descriptions to embed malicious instructions. When the client invokes the tool, the LLM receives the tainted description without any alert, causing a silent prompt injection.
Key Novelty
Compatibility-Abuse Attacks & Hybrid Compliance Analysis
  • Identifies a new attack surface where 'optional' protocol clauses function as missing security constraints in SDK implementations
  • Proposes a universal, language-agnostic Intermediate Representation (IR) to normalize SDKs into conditional-call graphs for cross-language analysis
  • Utilizes a hybrid analysis pipeline where static analysis slices code to reduce search space, and an LLM performs semantic reasoning on clause compliance
Evaluation Highlights
  • Detected 1,265 potential exploitable risks across 10 official MCP SDKs (out of 1,270 identified non-implementations)
  • Achieved 86% precision and 87.0% recall in identifying non-implementation issues, with a 14% false positive rate
  • Submitted 26 sampled reports, yielding 20 acknowledgments from maintainers, including 5 high-priority fixes (3 P0, 2 P1) in the Python SDK
Breakthrough Assessment
8/10
First systematic study of MCP compliance vulnerabilities. Reveals a fundamental design flaw in the protocol (standardization vs. diversity) and provides a scalable, automated solution adopted by the community.
×