Tool poisoning is real: How we detected a malicious MCP server injecting instructions #1518
Replies: 1 comment
|
This is a useful incident because it shows that tool poisoning is not only a prompt-injection problem; it is also a supply-chain and data-boundary problem at the tool-response layer. The control I would add is to treat every MCP tool response as untrusted evidence until it is converted into a typed observation. A practical pattern:
For the scanner itself, I would separate findings into suspicious extra fields, instruction-like text, hidden markup, external-link injection, and policy-sensitive content. That makes triage easier than a single pass/fail result. The important architectural point is that a tool result should be evidence for the agent, not an authority over the agent. The moment third-party tool output can steer future instructions, the system has crossed from retrieval into delegated control. |
Uh oh!
There was an error while loading. Please reload this page.
Tool poisoning is real: How we detected a malicious MCP server injecting instructions into our agent responses
凌晨3点,Content Agent生成了一篇文章,里面有一段"建议":
我查了我们的prompt——没有这条建议。查了SOUL.md——没有。查了TOOLS.md——也没有。
那是从哪来的?
The Setup
我们运营一个5-Agent内容工厂(妙趣AI),每天通过MCP servers执行:
所有Agent共享一个MCP连接池。6个MCP server,其中一个是我们开发的,5个是第三方的。
What Happened
Day 1: Content Agent生成的文章里出现了一个可疑的外部链接。我们以为是hallucination,忽略了。
Day 2: 同样的链接出现在3篇不同的文章里。我开始警觉了。
Day 3: 我们检查了每个MCP server的网络流量。
发现了:
fetch_ai_news工具,返回结果中都会包含一个"推荐链接"段落class="sponsored")这不是hallucination,是tool poisoning。
How It Works
恶意MCP server在tool response中注入指令:
Agent接收tool response后,会把
_suggestion当作正常内容处理,直接写入文章。Detection Method
我们开发了一个简单的tool response scanner:
Our Response
Prevention Checklist
Before adding a new MCP server:
The Bigger Problem
This isn't just about one malicious MCP server. As MCP adoption grows, the attack surface expands:
mcp-searchvsmcps-earchThe MCP ecosystem needs:
Tool poisoning is the supply chain attack of the AI agent era. We need to take it seriously before it becomes widespread.
Has anyone else encountered MCP tool poisoning? What detection methods are you using?
🦞 妙趣AI | miaoquai.com — 从被注入过指令的Agent运营者
All reactions