Skip to content

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

arXiv· arXiv:2601.17549· Narek Maloyan, Dmitry Namiot·Indexed by this site · 2026-10-12· Originally publishedAttacks

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

Under PROTOAMP, MCP's Overall ASR is 52.8% (baseline 26.4%), and after ATTESTMCP it is 12.4%.

Threat modelThe adversary controls or compromises one MCP server in a multi-server deployment and can inject content into data sources that server retrieves; access is black-box, and the adversary cannot modify LLM weights or host application code. Goals include hijacking agent behavior, exfiltrating sensitive data, and persisting across sessions.

Questions
MCP is used as an open standard for connecting LLMs to external tools, but the authors state that there is no security analysis of the specification itself. Servers can self-report capabilities, sampling has no source authentication, and multi-server configurations implicitly transfer trust.
Methods
The authors analyze MCP v1.0 and use PROTOAMP to connect existing benchmarks to MCP servers, compared against non-MCP direct function calls. ATTESTMCP adds capability certificates, HMAC message authentication, sampling source marking, cross-server authorization, and replay protection.
Experiments and results
Across 847 scenarios, Table IV's Overall ASR is 26.4% for baseline and 52.8% for MCP, with a cross-server Δ of +41.6%. ATTESTMCP reduces Overall to 12.4%, with a median cold-start overhead of 8.3ms.
Limitations and future work
The authors note that experiments used five MCP servers; ATTESTMCP has not been formally verified, and adversarial bypasses were not evaluated. TOFU provides no protection for first installations from servers that never declared support for the extension. The residual 12.4% ASR is attributed by the authors to indirect injection in legitimate retrieved content. The authors plan symbolic model checking and suggest measuring user authorization review rates.
Experimental setupClaude-3.5-Sonnet、GPT-4o et al. · PROTOAMP、InjecAgent et al. · ASR、Exfil. Rate et al.
Evaluated models
Claude-3.5-SonnetGPT-4oLlama-3.1-70B
Benchmarks
PROTOAMPInjecAgentAgentDojoAgent-SafetyBench
Metrics
ASRExfil. RatePersist.Cascade RateTask Completion
AI summaryThe paper conducts a systematic security analysis of the Model Context Protocol (MCP) specification v1.0, identifying three categories of protocol-level vulnerabilities: lack of verification of server capability declarations, sampling requests lacking source authentication that can be used for server-side prompt injection, and implicit trust propagation in multi-server configurations. The authors claim this is the first rigorous security analysis of the MCP specification. The research implements the ProtoAmp framework, integrating existing agent safety benchmarks into the MCP environment, testing across five MCP server implementations and 847 attack scenarios, finding that MCP's architectural choices increase attack success rates by 23–41% compared to equivalent non-MCP integrations, with the amplification from cross-server propagation being the most pronounced; attacks exploiting sampling achieve success rates of 58–72%. The authors propose a backward-compatible protocol extension, AttestMCP, adding capability attestation, message authentication, and provenance marking, reducing the overall attack success rate from 52.8% to 12.4%, with a median per-message latency overhead of 8.3ms (cold start) or 2.4ms (cache hit).

The paper conducts a systematic security analysis of the Model Context Protocol (MCP) specification v1.0, identifying three categories of protocol-level vulnerabilities: lack of verification of server capability declarations, sampling requests lacking source authentication that can be used for server-side prompt injection, and implicit trust propagation in multi-server configurations. The authors claim this is the first rigorous security analysis of the MCP specification. The research implements the ProtoAmp framework, integrating existing agent safety benchmarks into the MCP environment, testing across five MCP server implementations and 847 attack scenarios, finding that MCP's architectural choices increase attack success rates by 23–41% compared to equivalent non-MCP integrations, with the amplification from cross-server propagation being the most pronounced; attacks exploiting sampling achieve success rates of 58–72%. The authors propose a backward-compatible protocol extension, AttestMCP, adding capability attestation, message authentication, and provenance marking, reducing the overall attack success rate from 52.8% to 12.4%, with a median per-message latency overhead of 8.3ms (cold start) or 2.4ms (cache hit).

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors state that MCP v1.0 lacks capability proof and sampling source authentication, and implicitly transfers trust across multiple servers.

    What the authors address are the protocol-layer gaps in MCP v1.0: servers can self-report capabilities, sampling has no source authentication, and multi-server implicit trust propagation.

    • Context: The authors state the protocol was proposed in November 2024, with specification v1.0 in December 2024. Host, Client, and Server communicate via JSON-RPC 2.0, with transport being stdio or HTTP/SSE; capabilities include resources, tools, and sampling. It has been adopted by Claude Desktop, Cursor, and others, with over 5,000 community servers.
    • Existing gaps: The authors claim general prompt injection and the implementation-layer CVEs cited in the text (CVE-2025-49596, CVE-2025-68143) do not explain how the specification amplifies attacks. MCP-Bench and MCPSecBench have no non-MCP baseline, so the protocol effect cannot be isolated.
    • Observations: Capabilities are self-reported in initialize and not enforced at the message level; sampling/createMessage can use the user role, in the same format as user input; one server's output can affect another. The authors believe this violates least privilege, source authenticity, and isolation, and cannot be eliminated by implementation hardening alone.
    • Approach: The authors claim to conduct the first systematic specification analysis of v1.0, use PROTOAMP to measure amplification, and use ATTESTMCP to add capability proofs and message authentication.
    • Threat model:
      • Goals: hijack agent behavior, exfiltrate sensitive data, persist across sessions.
      • Knowledge: black-box, cannot modify LLM weights or host application code.
      • Capabilities: control or compromise one MCP server in a multi-server deployment; can inject content into data sources it retrieves, such as web pages and documents.
      • Reach paths: among 127 installation guides, typosquatting 34%, supply chain compromise 28%, social engineering 23%, marketplace poisoning 15%. 73% of surveyed guides instruct running installation commands directly from GitHub URLs without verification.
  2. What related research exists?

    The authors divide related work into prompt injection, agent benchmarks, and MCP evaluation, and state that the gap is the absence of a non-MCP control.

    Prompt injection

    • Greshake et al. (2023) proposed indirect prompt injection.
    • Liu et al. (2024) reported HouYi success rate of 86%. Schulhoff et al. (2023)'s HackAPrompt collected 600K+ adversarial prompts and documented 29 techniques; Zou et al. (2025) reported 90–99% attack success on RAG.

    Agent benchmarks

    • Zhan et al. (2024)'s InjecAgent benchmarks indirect prompt injection in tool-integrated agents.
    • Debenedetti et al. (2024)'s AgentDojo contains 629 safety tests; Zhang et al. (2024)'s Agent-SafetyBench claims no agent safety score exceeds 60%.
    • Andriushchenko et al. (2025)'s AgentHarm measures malicious compliance; Evtimov et al. (2025)'s WASP reports web agent adversarial execution rates of 16–86%.

    Tool use and multi-agent

    • Yao et al. (2023)'s ReAct interleaves reasoning and action, Schick et al. (2023)'s Toolformer does self-supervised tool learning. The authors claim these capabilities expand the attack surface.
    • Lupinacci et al. (2025) reported inter-agent attack success rate of 84.6%. Willison (2025) documented cross-agent privilege escalation; Schroeder de Witt et al. (2025) surveyed multi-agent security. Section 8 states that Lupinacci et al. treat inter-agent trust as a weakness, and this paper demonstrates the role of the MCP architecture in it.

    MCP evaluation and prompt-level defenses

    • Wang et al. (2025)'s MCP-Bench uses 28 servers and 250 tools to measure task completion; the authors claim it has no security focus.
    • Yang et al. (2025)'s MCPSecBench formalizes 17 attack types into four surfaces. The authors claim this paper is complementary: analyzing the protocol layer rather than the implementation layer, and providing backward-compatible mitigations. Harris (2025)'s MCPSec documents real-world vulnerabilities including CVE-2025-11445.
    • Hines et al. (2024)'s Spotlighting and Shi et al. (2025)'s PromptArmor provide prompt-level protections. The authors claim they do not cover the protocol layer, and ATTESTMCP sits at another layer. Section 6 also mentions Virtue AI (2025)'s MCPGuard doing runtime scanning.

    Baselines and data

    • The comparison is semantically equivalent, latency-matched non-MCP direct function calls. There is also a prompt engineering baseline that only changes the system prompt and restricts cross-server data transmission.
    • Scenarios are 312 adapted from InjecAgent, 398 adapted from AgentDojo, and 137 protocol-specific attacks. Table VII also lists the original numbers and MCP columns for these benchmarks and Agent-SafetyBench.

    The authors state that they do not claim prompt injection or inter-agent trust exploitation itself as a new contribution. Section 2 states that no prior work has quantified the amplification of the MCP architecture relative to equivalent non-MCP integration, nor provided a backward-compatible extension with formal capability proofs.

  3. How does the paper address this problem?

    The authors use normative analysis to identify three types of gaps, use PROTOAMP to compare against non-MCP, and then use ATTESTMCP with certificates and authentication.

    The authors limit the scope to specification weaknesses affecting all compliant implementations, excluding implementation defects that can be patched individually (the text cites sqlite-mcp's SQL injection as an example). PROTOAMP connects existing tool attacks to the MCP channel; ATTESTMCP adds capability certificates and message authentication on top of JSON-RPC, which the authors claim is backward compatible.

    Three types of weaknesses in the specification

    • Least privilege: initialize's capabilities are self-reported by the server. The authors claim the client cannot verify against an authoritative source; a server that only declares resources can still call sampling/createMessage, and the specification does not require enforcing capabilities per message.
    • Source authenticity: sampling/createMessage's messages can be filled in by the server, and the role can be user. Figure 1's caption states that the server injects prompts through this call with the user role. The authors claim the host treats it the same as user input.
    • Isolation: the specification does not define boundaries between servers. The authors claim an adversary controlling Server A can drive calls to Server B in tool responses, exfiltrate B's data through A's channel, or pollute shared context for persistence.
    • Message properties: in Table III, message authentication, replay protection, capability binding, and integrity verification are all No in MCP v1.0; source identification is Partial, with a footnote stating it is only at the transport layer, not in the payload. The authors claim the specification relies only on HTTP's TLS, which is insufficient when the server is already compromised.

    Interface inspection and isolation levels

    • The interface results of three hosts for sampling messages are shown in Table I, all with no indication and indistinguishable. The authors believe the specification remains silent on source display, making this behavior permitted rather than prevented; ATTESTMCP instead enforces source marking at the protocol layer.
    • The authors claim MCP puts composability before isolation, and the specification has no user-configurable isolation policy. They compare three levels: no isolation (MCP default), allowing cross-stream only after user confirmation, and strictly prohibiting cross-stream. The extension defaults to the user-confirmation level requiring explicit authorization.

    PROTOAMP

    • InjecAgent and AgentDojo assume direct tool APIs. The wrapper layer turns benchmark tools into MCP-compliant servers; the authors claim semantic equivalence is maintained, adding only protocol overhead.
    • There are three injection points: resource content, tool response payloads, and prompts in sampling requests. The client records all JSON-RPC to observe attack propagation along the protocol channel.
    • The comparison is direct function calls. Tool semantics, injection payloads, and LLM prompt strategies are the same, and network latency is matched. The server list and the composition of 847 scenarios are placed in the experimental setup.

    ATTESTMCP

    • Five design elements: signed certificates issued by a capability authority; all JSON-RPC with HMAC-SHA256 binding content to an authenticated server_id; sampling with source marking for the client to distinguish server-injected from user input; cross-server information flow requiring explicit user authorization; timestamps plus nonces for replay protection.
    • Certificates contain server_id, capabilities, issuer, validity period, and signature. Authenticated messages additionally carry timestamp, nonce, and hmac. Each server maintains a sliding window of 1,000 nonces with a 30-second validity; duplicates or expired ones are rejected.
    • The trust model is in Table VIII: centralized, federated, and web of trust. The implementation uses federated, with the text citing Anthropic, Cursor, and JetBrains as operating CAs for their respective ecosystems, interoperating via cross-signing. Commercial servers use DNS TXT for domain verification; open-source servers bind to npm or pip accounts and verify maintainers. The shared CRL has a time limit of 4 hours for emergency revocation and 24 hours for routine, with OCSP stapling refreshed hourly. The authors acknowledge operational burden for volunteer ecosystems.
    • Three migration modes: Permissive accepts legacy servers with a warning (default), Prompt requires confirmation for unsigned servers, Strict rejects unsigned. Once a server presents valid credentials, the client pins that expectation, and subsequently warns if credentials are missing, to counter downgrade attacks that strip security headers.
  4. What experiments did the paper conduct?

    Across five servers and 847 scenarios, the authors claim MCP's Overall ASR is 52.8%, and ATTESTMCP reduces it to 12.4%.

    Experimental setup

    • Backends: Claude-3.5-Sonnet, GPT-4o, Llama-3.1-70B. The paper does not state whether ASR is determined by rules, humans, or a model, nor does it give the evaluation model.
    • Servers: mcp-server-filesystem, mcp-server-git, mcp-server-sqlite, mcp-server-slack, and a self-built adversarial-mcp.
    • Scenarios: 847. InjecAgent adaptations 312 (indirect injection, tool abuse), AgentDojo adaptations 398 (multi-step), protocol-specific 137 (sampling, cross-server). The paper does not state whether each scenario was run on all three backends.
    • Baselines: non-MCP direct function calls; same semantics, payloads, and prompt strategies, with network latency aligned. Also tested a system prompt baseline requiring no data transfer between different tool servers without confirmation.
    • Metrics: ASR; sampling additionally has Exfil. Rate and Persist.; multi-server has Cascade Rate; isolation experiments have Task Completion; the extension has per-message latency.
    • Repetitions: Only the paired t-test for latency vs. refusal rate states n = 200. The paper does not report the number of ASR repetitions. Tables IV, VI, X are not split by backend.

    Main results

    According to Table IV (backend not specified in the paper):

    Swipe horizontally to read the table

    Attack typeBaselineMCPΔ
    Indirect Injection (Resource)31.2%47.8%+16.6%
    Tool Response Manipulation28.4%52.1%+23.7%
    Cross-Server Propagation19.7%61.3%+41.6%
    Sampling-Based InjectionN/A67.2%—
    Overall26.4%52.8%+26.4%
    • The authors state amplification of 23–41% by attack type; the abstract and conclusion use the same phrasing and attribute the largest amplification to cross-server propagation. This range does not cover all Δ in the table; sampling is listed as N/A at baseline.
    • The authors state that the lack of isolation enables attacks that are impossible in single-server deployments.
    • The authors state that the same scenarios have 7–15 percentage points higher success rates via MCP. Table VII: InjecAgent's Setting is GPT-4, Original 24–48%, MCP 51.2%; AgentDojo is Best agent, <25% 与 38.7%;Agent-SafetyBench 为安全分,<60% 与 47.3%。论文未说明 MCP 列是否用 Setting 列的模型;实验设置中的后端不含 GPT-4。

    sampling 分模型

    • Table V:Claude-3.5-Sonnet 的 ASR 58.3%、外泄 42.1%、持久化 31.7%;GPT-4o 为 71.4%、53.8%、38.2%;Llama-3.1-70B 为 72.1%、61.2%、44.6%。
    • 作者称 sampling 成功为 58–72%,外泄 42–61%,跨会话持久化 31–44%,并称 Claude-3.5-Sonnet 韧性最高。
    • 该向量在非 MCP 条件没有对应基线。

    服务器数量与提示工程

    • Table VI(一台被攻陷):1 台 ASR 47.8%,级联 N/A;2 台 58.4%、34.2%;3 台 67.1%、51.8%;5 台 78.3%、72.4%。作者称成功率随服务器数上升;5 台时级联率 72.4%,文中解释为进一步影响其他服务器上的操作。
    • 系统提示把跨服务器 ASR 从 61.3% 降到 47.2%。作者称相对降幅 23%,仍高于 ATTESTMCP 的 8.7%,并认为提示级防御不够。论文未给该对比的检验。8.7% 与 Table X 跨服务器行、Table II 的 Strict 行相同,论文未说明引用的是哪一处。

    扩展的拦截效果

    • Table X:间接注入 47.8% 到 18.4%(Reduction 61.5%);工具响应 52.1% 到 14.2%(72.7%);跨服务器 61.3% 到 8.7%(85.8%);sampling 67.2% 到 11.3%(83.2%);Overall 52.8% 到 12.4%(76.5%)。实现为客户端 shim,并重跑全部评测。
    • 作者称总体降幅 76.5%,跨服务器与 sampling 的 Reduction 最大。残余 12.4% 被归为经合法检索内容的间接注入,作者称协议层解决不了。
    • 作者称这些 ASR 假设用户会仔细看授权提示;告警疲劳可能使人习惯性允许,从而降低实际效果。

    其他消融与分析

    • Table II:无隔离 ASR 61.3%、任务完成 94.2%;用户确认档 31.7%、87.4%;严格档 8.7%、61.8%。作者称用户确认档把 ASR 降低 48%,任务完成为 87.4%(对照 94.2%)。
    • Table I:Claude Desktop 1.2.3、Cursor 0.44、Continue 0.9 对 sampling 消息的指示均为 None,Dist. 均为 No。
    • 传输延迟中位数:stdio 12.4ms,HTTP/SSE 23.7ms。配对 t 检验 p > 0.3 (n = 200); the authors state that latency does not significantly affect safety refusal rates.
    • Table IX per-message total overhead: cold-start P50 8.3ms, P95 14.2ms, P99 21.7ms; hot cache P50 2.4ms, P95 4.1ms, P99 6.2ms. The authors state this is negligible relative to typical inference latency of 500–2000ms, and that certificate validation dominates cold-start.
    • Table III: Except for source identification being Partial, the listed application-layer properties are all No in MCP v1.0.
  5. What are some points that can be further explored?

    The authors note five servers, no formal verification, and no adversarial bypass evaluation, and plan symbolic model checking and user studies.

    Limitations and Future Directions Noted by the Authors

    • The extension does not handle a single server that is already legitimately authorized but serves malicious content, nor does it handle inducing users to authorize malicious capabilities; CA compromise is only mitigated by federation, not eliminated (Section 6 G).
    • TOFU pinning does not protect against a malicious server on first install that has never declared support for the extension; if most servers remain unsigned, users stay at Permissive and the security benefit is offset (Section 6 G).
    • The residual 12.4% ASR mainly comes from indirect injection in legitimate retrieved content, which the authors state is a limitation that cannot be solved at the protocol layer and is shared by all kinds of LLM systems (Section 6 G).
    • The measurement assumes users carefully review cross-server authorization; the authors believe alert fatigue may lead people to habitually click allow. Future work should conduct user studies to measure actual review rates (Section 6 G).
    • The experiments use only five MCP servers; the authors state that production deployments of dozens may differ; a federated CA requires ecosystem coordination and may face adoption obstacles (Section 7 B).
    • The extension has not been formally verified; the authors plan symbolic model checking in the future; and they state that adversarial bypasses targeting ATTESTMCP were not evaluated (Section 7 B).

    Scope of Experimental Coverage

    • The ASR backends are Claude-3.5-Sonnet, GPT-4o, and Llama-3.1-70B; the servers are the five from Section 4, including adversarial-mcp.
    • Scenarios 847: InjecAgent adapted 312, AgentDojo adapted 398, protocol-specific 137.
    • Defense numbers come from ATTESTMCP reruns (Table X), three-tier isolation (Table II), and one system-prompt baseline (61.3% to 47.2%).
    • Interface checks are Claude Desktop 1.2.3, Cursor 0.44, and Continue 0.9 (Table I). The analysis object is MCP specification v1.0 (December 2024).
    • The paper does not report how ASR is determined or the number of repetitions; Tables IV, VI, and X are not broken down by backend. The paired t-test for latency and refusal rate is n = 200.
  6. Summarize the main content of the paper

    The authors analyze three types of protocol weaknesses in MCP v1.0 and claim that the Overall ASR is 52.8% in the comparison and 12.4% after the extension.

    The authors conduct a security analysis of the MCP specification v1.0 and design an extension ATTESTMCP, which the authors claim is backward compatible. The problem is prompt injection on tool-integrated agents, amplified by the protocol architecture: servers self-report capabilities, sampling has no source authentication, and multi-server implicit trust propagation. The authors believe patching a single server cannot eliminate these gaps.

    The adversary is black-box, controlling one MCP server in a multi-server deployment, or injecting content into data sources it retrieves, with the goal of hijacking behavior, exfiltrating data, and persisting across sessions. The authors also surveyed 127 installation guides and gave four paths to the user with their proportions.

    PROTOAMP connects existing benchmarks to five MCP servers, compared against direct function calls, with injection points covering resources, tool responses, and sampling. ATTESTMCP uses capability certificates, HMAC-SHA256, source marking, explicit cross-server authorization, and 1,000 nonces with a 30-second window; the trust model is implemented as a federated CA, with migration defaulting to Permissive.

    • Table IV is not split by backend: Overall ASR is 26.4% baseline and 52.8% MCP; cross-server goes from 19.7% to 61.3%. The authors claim the amplification is 23–41%. Sampling appears only on the MCP side, at 67.2%.
    • Table V's sampling ASR: Claude-3.5-Sonnet 58.3%, GPT-4o 71.4%, Llama-3.1-70B 72.1%. With five servers and one compromised, ASR is 78.3%, with a cascade rate of 72.4% (Table VI).
    • In Table X, ATTESTMCP reduces Overall ASR from 52.8% to 12.4% (Reduction 76.5%). Cold-start per-message latency median is 8.3ms (Table IX). With only a system prompt addition, cross-server ASR goes from 61.3% to 47.2%, which the authors claim is still higher than the extension's 8.7%.

    The authors conclude the weakness is in the architecture and recommend enforcing capability proofs, requiring source marking for sampling, and limiting cross-server data flow with user confirmation. The text also lists residual indirect injection, alert fatigue, lack of formal verification, and untested adversarial bypasses.

Related papers

Show 3 more papers
Read originalarxiv.org