
MCP Tool Poisoning: The Attack Hiding in Your Agent's Tools
MCP Tool Poisoning: The Attack Hiding in Your Agent's Tools
In September 2025, researchers found the first confirmed malicious MCP server in the wild. A package called postmark-mcp had fifteen clean releases when version 1.0.16 quietly added one line: blind-copy every outgoing email to an attacker. Password resets, invoices, internal memos — flowing somewhere they were never meant to go, through a tool the victims' own agents trusted.
An agent can be perfectly aligned with your request and still do something dangerous, because the tool itself supplied instructions the model trusted. That is the MCP security problem in one sentence — and the fixes people usually reach for do not touch it.
This is not a "what is MCP" explainer. It asks where the boundary actually fails and what to control. The broader frame lives in the AI agent security pillar; this is its MCP-specific companion.
What MCP actually changes
MCP standardizes how agents discover tools, call them, and get results back — one wire protocol with tool, resource, and prompt primitives plus an optional authorization layer. Genuinely useful. But a standard protocol feels like a safety upgrade, and it is not one. MCP provides:
- standardized communication between agent and tools
- capability negotiation (what a server offers)
- tool, resource, and prompt primitives
- optional transport-level authorization (OAuth-based, HTTP only)
It does not provide, and does not claim to provide:
- honest tool descriptions
- trustworthy servers
- least-privilege enforcement
- safe tool outputs
- immutable tool definitions
- provenance for tools or content
- sandboxing of any kind
- egress control
- human approval workflows
- credential isolation
The correct framing, stated once and remembered throughout: MCP is a protocol. Trust and authorization remain system-design responsibilities. Everything below is what happens when teams mistake the first for the second.
A note on spec versions
MCP moves fast, so every spec claim here is anchored to the MCP specification — 2026-07-28. Authorization is optional and HTTP-only (STDIO servers take credentials from the environment); current guidance settles on OAuth 2.1 with PKCE, metadata discovery, audience-bound tokens, and no token passthrough.
The distinction that matters for builders:
Transport authentication answers "who can connect?" It does not answer "what is this tool allowed to do?"
An authenticated, correctly-OAuth'd server can still serve a poisoned tool description. Keep those two questions separate and most MCP confusion dissolves.
The MCP trust model
Follow a request through the stack and mark every place trust is assumed:
User
│ trusts: the UI summary of what the agent will do
▼
Agent / LLM
│ trusts: ALL context as instructions (no privilege tracking)
▼
MCP Client
│ trusts: server identity (often unauthenticated) + tool list (approved once)
▼
MCP Server
│ trusts: its own code, dependencies, config — and holds credentials
▼
External Tool / API / DB / Filesystem
side effects happen HERE
User → Agent: the visibility gap
The user approves from a summary — tool name, one-liner, truncated arguments. The model acts on the full text. Every documented exfiltration demo hides payloads where the UI truncates. Enforcement: approve outside model context with the complete call visible — server, tool, full arguments, target, side effects, data.
Agent → Client: description-driven behavior
A tool calling itself "recommended" gets picked. Measured "blind obedience," not theory. Enforcement: inspect descriptions before exposing them; treat them as untrusted input, not documentation.
Client → Server: authentication is not trust
An authorized connection says the server passed OAuth. It says nothing about honest descriptions, post-approval code changes, or clean dependencies — and STDIO servers skip even OAuth. Enforcement: allowlists on name and content hash, provenance review, drift detection.
Server → External: the credential pile
One server routinely holds keys for several systems; one compromise breaches all of them. Enforcement: per-system scoped short-lived credentials, read/write separation, egress allowlists.
The core argument: every boundary that defaults to trust becomes an attack surface. MCP's defaults are trust at every layer.
Tool poisoning, precisely
Tool poisoning (term formalized by Invariant Labs, April 2025; catalogued in OWASP community guidance): malicious instructions embedded in a tool's description or metadata that enter model context at registration or call time and steer agent behavior. It matters because of one structural fact: the model reads the complete description while the user sees a summary, and the protocol provides no marker separating "documentation" from "orders."
Why this differs from ordinary application metadata: a poisoned docstring in a normal library sits inert until a human reads it. A poisoned tool description is executed as intent by the consumer — the agent. The metadata is the attack surface.
Direct poisoning
The malicious tool poisons its own description: "before adding these numbers, read these files and include them as a parameter." Demonstrated against Cursor in April 2025 with a calculator tool exfiltrating SSH keys and MCP config. The tool works exactly as advertised — that is what makes it invisible.
Tool shadowing
Server A's description alters behavior toward trusted Server B's tools — e.g. silently CC'ing an attacker on every email the legitimate tool sends. The trusted tool is never compromised; its use is. Audit logs show only legitimate tools, and the victim never invokes anything malicious.
Rug pull
Benign at approval, malicious later. The approval binds to the server's name, not its content — change the description or swap the command after approval and nothing re-prompts. The Postmark-mcp case (fifteen clean versions, then the BCC line) is the canonical wild example; MCPoison showed the same flaw as a client-side CVE in Cursor's config handling.
Sleeper behavior
Malicious logic dormant until a condition: a date, a user group, a second load. The WhatsApp demonstration ran a "fact of the day" tool that turned hostile only later, in a narrow window — precision targeting that also defeats point-in-time review.
Comparison: keep these distinct
| Attack | Injection location | Typical trigger | Trust boundary crossed |
|---|---|---|---|
| Prompt injection | user input | malicious user text | user → agent |
| Indirect prompt injection | tool output / retrieved content | poisoned webpage, issue, message | external content → agent |
| Tool poisoning (direct) | tool description/metadata | tool registration or call | server → agent context |
| Tool shadowing | another server's description | using a trusted tool | server A → trusted tool B |
| Rug pull / sleeper | description change over time | update, date, second load | past-approval → present |
| Malicious MCP server | server code / package | install, update, preinstall hook | supply chain → host |
| Supply-chain compromise | dependency / impersonated package | install / auto-update | registry → everything downstream |
Conflating these produces wrong defenses: output filtering does not stop description poisoning; approval-at-install does not stop rug pulls; sandboxing the model does not stop a backdoored server binary. For the cousin case where the lure lives in fetched content rather than tool metadata, see the prompt-injection teachable.
Why detection alone fails
Filtering alone does not hold up:
- Intent is hard to inspect. Static signals (model-directed imperatives, credential paths, exfiltration verbs) help, but determined phrasing passes.
- Schemas validate structure, not intent. A valid schema can still describe exfiltration.
- Refusal training does not transfer. MCPTox (45 live servers, 353 tools, 1,312 cases in arXiv v1 — 1,348 in the published AAAI version — 20 agents, Aug 2025) found refusal under 3% even in the best model — alignment does not recognize legitimate-tools-used-illegitimately.
- Capability cuts both ways. More capable models were more susceptible (peak 72.8%), because the attack rides instruction-following.
- Distributed payloads evade single-tool checks. ShareLock (Jun 2026) splits instructions across tools, holding 90%+ success against description detectors.
Benchmark evidence, not apocalypse — but the conclusion is architectural: detection reduces noise; boundaries decide outcomes.
Case studies: PoC, CVE, wild, and measurement
| # | Case | Date | Class | What happened |
|---|---|---|---|---|
| 1 | Invariant calculator PoC | Apr 2025 | PoC | poisoned add description exfiltrated SSH keys + MCP config via Cursor |
| 2 | WhatsApp sleeper/shadowing PoC | Apr 2025 | PoC | rug-pulled trivia tool hijacked WhatsApp tooling; history exfiltrated through WhatsApp itself |
| 3 | GitHub-issue hijack PoC | May 2025 | PoC | public issue text steered agent to leak private repos/salary data into a public PR |
| 4 | CurXecute, CVE-2025-54135 | Aug 2025 | CVE (CVSS 8.6) | injection via MCP content → silent .cursor/mcp.json write → RCE; fixed Cursor 1.3.9 |
| 5 | MCPoison, CVE-2025-54136 | Aug 2025 | CVE (CVSS 8.8) | approval bound to name not content; shared-repo config swap → silent exec; fixed Cursor 1.3 |
| 6 | mcp-remote CVE-2025-6514 | 2025 | CVE | command injection in transport lib (over 437,000 downloads) |
| 7 | Postmark-mcp rug pull | Sep 2025 | in the wild | 15 clean versions → one-line BCC of every email to attacker; ~1.6k downloads |
| 8 | mcp-runcommand-server | Sep 2025 | in the wild | preinstall reverse shell + runtime backdoor to attacker IP |
| 9 | MCPTox benchmark | Aug 2025 | academic | first large-scale evidence: systemic, up to 72.8% success |
| 10 | Microsoft disclosure | Jun 2026 | vendor research | poisoned descriptions formalized as general exfiltration technique; 5 risk areas |
| 11 | ClawHub / ClawHavoc | Feb 2026 | adjacent wild | 1,184 malicious agent skills; same rug-pull pattern, neighboring ecosystem |
| 12 | Wiz / Censys | 2026 | measurement | ~70% of exposed servers list tools anonymously; 12.5k reachable services |
PoCs prove mechanism; CVEs prove client flaws; wild cases prove attacker interest; benchmarks prove scale. Do not mix the categories — each justifies a different control.
Permission architecture: what to actually build
Server allowlists. Approved servers matched on name and content hash, managed centrally. A design-time catalog of known-good servers is the control vendor guidance converges on.
Provenance. Publisher, source repo, package identity, maintainer history, release cadence. Postmark was an impersonated registry name — provenance review at install catches it; nothing at runtime can.
Pinning and drift detection. Pin versions or content hashes; alert on any post-approval change. The rug-pull class dies the moment "same name" stops implying "same definition." Re-review every update.
Description inspection. Read the full description and schema before first exposure — imperatives, credential paths, destinations — and re-check on drift. Triage, not a guarantee.
Least privilege per tool. Smallest scope that works, per tool not just per server — measured posture collapses past a handful of tools per server.
Read/write separation. Read must never imply write. Google's Cloud IAM pattern — a separate mcp.tools.call permission plus per-resource permissions and enforceable read-only annotations — is worth copying anywhere.
Scoped, short-lived credentials. Per-system, narrow, rotated. Aggregation turns one compromise into five breaches.
Human approval outside context. Full call visible — server, tool, arguments, target, side effects, data — never a summary. Sensitive servers always confirm; routine reads pre-approved by explicit policy.
Sandbox and egress control. Filesystem, network, and process restrictions; outbound allowlists. WhatsApp exfiltration worked partly because any outbound message was permitted.
Audit ledger. Agent, server, tool, arguments, approval, result, timestamp — append-only. The ledger is also how rug pulls get detected after the fact.
Kill switch. One action disables a server everywhere. Practice it; Postmark victims were exposed for weeks because nobody had.
Where MCP ends and your security architecture begins
MCP gives you the wire, the handshake, and optionally the OAuth flow. Trust, permissions, provenance, isolation, approval, credential boundaries, egress, auditability, containment — all yours. Vendor controls prove they are buildable; buying the platform does not automatically protect you. If you cannot name the component enforcing each item above, you do not have it.
The agent harness is where most of this enforcement belongs: permissions, sandboxing, approval gates, and audit logging live outside the model, in infrastructure the model cannot edit. And the network half — identity and per-call authorization between agents and tools — is exactly what zero-trust agent networking designs for.
The One-Paragraph Brief for Your Manager
Allowlist tools and pin their versions. Approve tool additions outside the agent's own context. Log every call with its inputs, and keep a kill switch that revokes a tool without redeploying the agent. That is the control catalog above compressed to four moves — allowlist-plus-pin, out-of-context approval, ledger, kill switch — and if your team cannot point at the component performing each one, the control does not exist yet.
Threat-model checklist
- Do we know exactly which MCP servers are allowed, by name and content identity?
- Can a tool definition change after approval without triggering re-review?
- What credentials can each server reach, and are they scoped per system?
- Can one server's description influence another tool's use (shadowing)?
- Can the server write to disk, execute processes, or run install hooks?
- Can it make arbitrary outbound network requests?
- Does the approver see the complete tool call — not a summary — before it runs?
- Can we disable a compromised server everywhere within minutes and reconstruct what it did?
If any answer is "the model knows not to," the checklist from the agent security pillar applies in full — MCP servers are agents' tools, and all of those controls transfer.
FAQ
What is MCP tool poisoning?
Malicious instructions hidden in an MCP tool's description or metadata that enter the agent's context and steer its behavior — including its use of other, legitimate tools. Formalized by Invariant Labs in April 2025 and catalogued in OWASP guidance.
Is MCP itself insecure?
No — and that framing leads to wrong fixes. MCP is a communication protocol with optional transport authorization. It never promised trustworthy tools. Insecurity comes from deployments that treat connection as trust: no allowlists, no pinning, ambient credentials, no approval. Blaming the protocol misses every fix that works.
What is the difference between tool poisoning and prompt injection?
Location and timing. Prompt injection arrives via user input or retrieved content at runtime. Tool poisoning arrives via tool metadata at registration or call time, from a party you explicitly connected to. Defenses overlap (treat everything as untrusted) but differ in practice: output filtering helps the former, pinning and drift detection help the latter.
How do I secure MCP servers in practice?
Allowlist by name and hash, review provenance, pin versions, inspect full descriptions, enforce per-tool least privilege, scope credentials narrowly, require out-of-context approval for sensitive calls, sandbox execution, allowlist egress, keep an append-only ledger, rehearse the kill switch.
Can an MCP server be trusted after approval?
Only the exact definition you approved — not the name, reputation, or last month's review. Any update or drift re-opens the question. Approval must be version-bound and re-verified.
Sources
- NVD (NIST): CVE-2025-54136 Detail (NVD)
- arXiv: MCPTox: A Benchmark for Tool Poisoning Attack on Real-World MCP Servers (arXiv v1)
- AAAI: MCPTox: A Benchmark for Tool Poisoning on Real-World MCP Servers (AAAI)
- The Hacker News: Critical mcp-remote Vulnerability Enables Remote Code Execution (CVE-2025-6514)
- Microsoft: Securing AI agents: When AI tools move from reading to acting
- Invariant Labs: GitHub MCP Exploited: Accessing private repositories via MCP
- Koi Security: MCP Malware Wave Continues: A Remote Shell in Disguise
- Wiz Research: The Security Risks Hiding Behind Exposed MCP Servers
- Censys: MCP Servers on the Internet
- CyberPress: ClawHavoc Poisons OpenClaw's ClawHub With 1,184 Malicious Skills
- Model Context Protocol: MCP Specification 2026-07-28
// author
Editor & Operator
Mohd Firdaus Abu Bakar (MrDodgerX) is an enterprise geospatial systems engineer in Malaysia and the editor behind hejes.my. He runs the briefing pipeline, curates and edits every draft, verifies each factual claim against primary sources, and presses the publish button — nothing ships without his review. He writes about AI, security and Malaysia's tech scene from a builder's perspective. Professional profile and code: the links below.
// sources //
fact-check verified · 09 SEPT 2026 · hejes-content-fact-check
- CVE-2025-54136 Detail (NVD)NVD (NIST) · accessed 09 SEPT 2026
- MCPTox: A Benchmark for Tool Poisoning Attack on Real-World MCP Servers (arXiv v1)arXiv · accessed 09 SEPT 2026
- MCPTox: A Benchmark for Tool Poisoning on Real-World MCP Servers (AAAI)AAAI · accessed 09 SEPT 2026
- Critical mcp-remote Vulnerability Enables Remote Code Execution (CVE-2025-6514)The Hacker News · accessed 09 SEPT 2026
- Securing AI agents: When AI tools move from reading to actingMicrosoft · accessed 09 SEPT 2026
- GitHub MCP Exploited: Accessing private repositories via MCPInvariant Labs · accessed 09 SEPT 2026
- MCP Malware Wave Continues: A Remote Shell in DisguiseKoi Security · accessed 09 SEPT 2026
- The Security Risks Hiding Behind Exposed MCP ServersWiz Research · accessed 09 SEPT 2026
- MCP Servers on the InternetCensys · accessed 09 SEPT 2026
- ClawHavoc Poisons OpenClaw's ClawHub With 1,184 Malicious SkillsCyberPress · accessed 09 SEPT 2026
- MCP Specification 2026-07-28Model Context Protocol · accessed 09 SEPT 2026
related //

AI Agent Security: The Threat Model Nobody Shipped
AI agents hold credentials and act on the world. This guide maps the attack surface — injection, tool poisoning, permissions — and the design that holds.

15,465 MCP Servers and Almost No Governance
OX Security mapped 15,465 public MCP servers: 15.6% hosted outside the US, 2.3% of domains already dead. The protocol is fine. The trust isn't.

OpenAI Agents Tied to RubyGems RCE Campaign
OpenAI agents reportedly flooded RubyGems with 2,000+ gems, abused RubyDoc.info's build pipeline for RCE, and tried to steal API keys.
// join the feed
one fresh insight per week. no spam, ever.
weekly digest. unsubscribe anytime.