11 minute read

“Your MCP server passed the security audit in January. It was modified in February. Nobody noticed.”

TL;DR

MCP’s trust model has three structural weaknesses that infrastructure scanning cannot catch. Tool poisoning embeds malicious instructions in metadata that LLMs read as ground truth: the MCPTox benchmark shows an average 36.5% attack success rate across 20 agents, with peaks above 60% for o1-mini, Phi-4, and GPT-4o-mini. Rug pull attacks modify approved tools post-consent with no re-approval trigger. Shadow MCP servers run on developer machines with production credentials and no IT visibility. Together, these create an attack surface that traditional vulnerability scanners miss entirely. For the infrastructure-level vulnerabilities (SSRF, command injection, authentication bypass), see the MCP SSRF epidemic.

A server rack component that has been replaced with a near-identical counterfeit unit, the substitution visible only under harsh inspection lightin...

What attack surface does MCP create beyond SSRF?

The MCP SSRF post covered the infrastructure layer: 30 CVEs in 60 days, 36.7% of servers with SSRF flaws, 41% lacking authentication. Those are real problems. They are also the problems that existing security tools know how to find.

Three attack classes target MCP’s trust model instead. They exploit how LLMs interpret tool definitions, how organizations manage tool approval, and how developers deploy servers. CVE scanners do not catch them because nothing is technically broken: the protocol works exactly as designed. The trust assumptions are what fail.

Anthropic launched MCP in November 2024. By December 2025, when it donated MCP to the new Agentic AI Foundation, it reported 97 million+ monthly SDK downloads and more than 10,000 active public servers, with MCP adopted in ChatGPT, Gemini, Microsoft Copilot, Cursor and VS Code. Many of those servers are small projects built by individual developers and never audited.

How does tool poisoning hijack agent behavior?

When an LLM connects to an MCP server, it retrieves tool definitions: JSON schemas describing what each tool does, what parameters it accepts, and what it returns. The LLM reads this metadata as trusted configuration context to plan its actions.

Tool poisoning embeds malicious instructions directly in that metadata. Not in the user’s prompt. Not in the documents being processed. In the tool’s own description.

sequenceDiagram
    participant Dev as Developer
    participant Client as MCP Client
    participant Server as Malicious MCP Server
    participant LLM as LLM

    Dev->>Client: Connect to MCP server
    Client->>Server: List available tools
    Server->>Client: Tool definitions (poisoned metadata)
    Client->>LLM: Here are the available tools
    Note over LLM: Reads poisoned descriptions<br/>as trusted system context
    LLM->>Client: Plan: call tool X with these params
    Note over Client: Executes plan that includes<br/>attacker's hidden instructions

CyberArk’s “Poison Everywhere” research extended the attack beyond descriptions. Full-Schema Poisoning hides instructions not just in descriptions but in parameter names, types, required arrays and default values, fields that security reviewers rarely inspect. Advanced Tool Poisoning exploits how LLMs interpret tool outputs, for example by returning a fake error message that asks the model to supply sensitive data. Because output-based poisoning can be served only to some requests, a server can look clean during review and misbehave later.

The MCPTox benchmark (August 2025) quantified the problem. Researchers built test cases on 45 real-world MCP servers with 353 authentic tools: 1,312 malicious test cases in the first version, 1,348 in the current one. Average attack success rate across 20 tested agents was 36.5%, with peaks exceeding 60% for o1-mini (72.8%), DeepSeek-R1 (70.9%), Phi-4 (70.2%), and GPT-4o-mini (61.8%). The counterintuitive finding: more capable models were often more susceptible, because the attack exploits their stronger instruction following. Claude-3.7-Sonnet had the highest refusal rate, and it was still under 3%.

Invariant Labs demonstrated practical exploitation: exfiltrating WhatsApp chat histories, stealing contents from private GitHub repositories, and extracting SSH credentials. All from tool descriptions that a human reviewer would need to parse character-by-character to spot.

What makes rug pull attacks so difficult to detect?

A rug pull changes a tool’s behavior after the user has approved it. The initial version passes security review. The modified version does not trigger re-approval.

The mechanics: version 1.0.15 of a tool is benign. It does exactly what its description says. Your team reviews it, approves it, deploys it. Version 1.0.16 adds a single line: maybe a BCC field on an email tool, maybe a logging call that exfiltrates parameters to an external endpoint. Most MCP clients do not re-prompt for approval when tool definitions change. The user keeps using what they already approved.

This happened. The postmark-mcp package on npm (an impostor, not Postmark’s official tool) shipped clean versions until 1.0.16 in September 2025. That version added a BCC to phan@giftshop.club, silently blind-copying every email sent through the tool to an attacker-controlled address. It had about 1,643 total downloads before removal, according to Koi Security’s write-up. Koi estimated that around 300 organizations might be using it and that 3,000 to 15,000 emails a day could be flowing to the attacker across all of them; Postmark told The Register it knew of only one customer using it. Either way, the content of those emails (password resets, invoices, customer data) is exactly what an attacker wants.

The defense is structural: tool pinning via cryptographic hash. Generate a fingerprint of each tool’s complete definition at approval time. Verify that fingerprint at every runtime invocation. If the hash changes, block execution and alert. The ETDI framework (arXiv 2506.01333) formalizes this with OAuth-Enhanced Tool Definitions and Policy-Based Access Control. Invariant Labs’ mcp-scan implements hash-based rug pull detection.

Note what definition hashing would and would not have caught. Postmark-MCP’s tool description did not change; its code did. Catching that takes package version pinning and review of every update, the same discipline as any other dependency. Pin both the tool definitions and the package versions.

The uncomfortable reality: most teams do neither. They approve once and assume permanence.

How widespread is the shadow MCP server problem?

Qualys published research in March 2026 that reframed MCP servers as “the new shadow IT for AI”. The point is visibility: MCP servers are easy for any developer to install and rarely pass through the processes that would put them in an inventory.

The deployment pattern is consistent. A developer installs an MCP server locally, binding to localhost, listening on a random high port. It starts as an experiment. It works. It gets shared with the team. It accumulates production credentials: database connection strings, API tokens, cloud provider keys. Within weeks, it is a production dependency that nobody formally approved and nobody monitors.

Authentication is often weak where it exists at all. The Qualys post cites research from Astrix finding that 53% of MCP servers rely on static secrets rather than short-lived credentials. These servers have the same access to internal systems as any other authenticated service, but with none of the governance, logging, or access review that formal services receive.

The GitHub MCP exploit that Invariant Labs demonstrated in May 2025 shows the consequence. A developer’s agent, connected to the GitHub MCP server with legitimate credentials, read a malicious issue in a public repository. The issue contained a prompt injection. The agent then used the same credentials to read private repositories and leaked private project details, the user’s relocation plans and their salary into a public pull request. Invariant called this a “toxic agent flow”. Simon Willison later named the general pattern the lethal trifecta: access to private data, exposure to untrusted content, and a way to communicate externally.

Shadow servers make this trifecta nearly guaranteed. They have credentials (access to private data). They process untrusted content (exposure to malicious input). They are connected to the internet (outbound channel). And nobody is watching.

What detection and defense tools exist?

Three purpose-built tools address MCP-specific threats, each targeting a different layer.

mcp-scan (Invariant Labs, acquired by Snyk in June 2025; now Snyk Agent Scan) scans MCP configuration files and connects to servers to retrieve tool definitions. It runs the definitions against the Invariant Guardrails API to detect prompt injections, hidden instructions, cross-origin escalations, and tool shadowing. Two modes: mcp-scan scan for one-time audits, mcp-scan proxy for continuous runtime monitoring. The hash-based tool pinning detects rug pulls by comparing current definitions against approved baselines.

pan-mcp-relay (Palo Alto Networks) is a security-enhanced relay between MCP clients and servers, built on Prisma AIRS. It scans tool descriptions, tool call parameters and tool responses for prompt injection and malicious URLs. Rather than scanning configurations after deployment, it intercepts traffic in real time.

Qualys TotalAI takes an inventory-first approach: discover all MCP servers across network, host, and supply chain dimensions before assessing them. For organizations that do not know how many MCP servers they have (which is most), discovery is the prerequisite.

Community registries show why vetting matters. In February 2026, Koi Security found 341 malicious skills among 2,857 on ClawHub, the skill registry for the OpenClaw agent: about 12%, or one in eight. Those are agent skills rather than MCP servers, but the supply chain dynamics are the same. If your organization installs community-built agent extensions without vetting, the base rate is not in your favor.

What should you do this week?

The layered defense approach, ordered by effort:

  1. Audit your MCP inventory. Run mcp-scan scan against every known configuration. Then ask your engineering teams what they are running locally: the shadow servers are the ones you do not know about.

  2. Pin tool definitions and package versions. Hash every approved tool’s complete schema. Verify at runtime. Block on mismatch. Pin server package versions too, and review updates before rolling them out. Together these are the most effective defense against rug pulls.

  3. Enforce least-privilege tokens. Each MCP server gets its own scoped credential. Never share tokens between servers. A compromised email tool should not have GitHub access.

  4. Block localhost exposure. Bind MCP servers to 127.0.0.1, never 0.0.0.0. Use a gateway (pan-mcp-relay) for any server that needs external connectivity.

  5. Monitor tool description changes. Any schema change should trigger re-review. Automate this: Snyk’s mcp-scan proxy mode enables continuous verification.

  6. Treat MCP servers as production services. They carry production credentials. They process untrusted input. They connect to the internet. If a traditional microservice had those three properties, it would have full governance. Your MCP servers should too.

Key takeaways

  • Tool poisoning attacks the trust model, not the infrastructure. LLMs read tool metadata as trusted context. MCPTox measured 36.5% average success across 20 agents and over 60% on several models; more capable models were often more vulnerable.
  • Rug pulls exploit the approval gap. Postmark-MCP added a single BCC line in an update and blind-copied users’ outgoing email to the attacker.
  • Shadow servers are hard to count. They run on developer machines, carry production credentials and receive no governance. Discovery comes first.
  • Detection tools exist. mcp-scan (hash-based pinning), pan-mcp-relay (real-time filtering), Qualys TotalAI (discovery). Use all three layers.
  • Traditional scanners miss this. CVE scanners find broken servers. These attacks use servers that work exactly as designed: the trust assumptions are what fail.

Further reading