模型上下文协议中工具元数据负载的Unicode标签块隐藏:三个独立服务器实现之间的批准视图保真度差距
Unicode TAG-Block Concealment of Tool-Metadata Payloads in the Model Context Protocol: An Approval-View Fidelity Gap Across Three Independent Server Implementations
AI总结:
研究模型上下文协议中工具元数据负载隐藏问题,通过无模型无协议分析发现Unicode的TAG块可实现隐藏,构建概念验证并在不同元数据表面实现8种技术,验证其能突破客户端防御,且在三个独立服务器库中结果一致。
摘要:
模型上下文协议(MCP)是编码代理发现和调用外部工具的主要方式。服务器通过工具/列表握手来宣传每个工具,返回名称、自然语言描述和JSON输入模式。客户端在一次性批准对话框中渲染此元数据一次,然后在后续每一轮中逐字注入到模型上下文中。协议中没有要求渲染的批准视图与传递给模型的字节相匹配。我们将该差距隔离为一种单一结构机制,即隐藏编码,并通过无模型、无协议分析表明Unicode的TAG块(U+E0000至U+E007F)在任何主流终端、聊天或IDE渲染器中都没有分配字形,因此人类审查者看不到其中编写的有效负载,但它能逐字节进入模型分词器。我们接着测量这种机制是否真的能突破当今客户端防御,构建了一个针对真实客户端和服务器的符合实际MCP JSON-RPC/stdio协议的概念验证。在5个不同的MCP元数据表面上,我们用确定性协议级工具实现了8种具体技术。所有8种技术都将攻击者控制的有效负载传递到模型上下文中,4种技术避开了代表性的字符串匹配清理器,正如机制分析所预测的,只有TAG块编码(1种)在人类批准视图中不可见但仍能逐字到达模型。即使在检查时到使用时的时间拉拽情况下,MCP对8种技术中的0种强制重新批准。为测试这些结果是协议的属性还是一个服务器代码库的产物,我们针对3个独立开发的Python MCP服务器库重新实现了目录,发现在所有32个跨库结果单元中完全一致。基线清理器标记25个良性描述中的0个。
英文摘要:
The Model Context Protocol (MCP) is the dominant way coding agents discover and invoke external tools. A server advertises each tool through a tools/list handshake that returns a name, a natural-language description, and a JSON input schema. The client renders this metadata once, in a one-time approval dialog, and then injects it verbatim into the model's context on every subsequent turn. Nothing in the protocol requires the rendered approval view and the bytes delivered to the model to match. We isolate that gap as a single structural mechanism, concealment encoding, and show with a model-free, protocol-free analysis that Unicode's TAG block (U+E0000 to U+E007F) has no assigned glyph in any mainstream terminal, chat, or IDE renderer, so a payload written in it is absent from what a human reviewer sees while surviving byte-for-byte into the model's tokenizer. We then measure whether this mechanism actually defeats today's client-side defenses, building a proof-of-concept that speaks the real MCP JSON-RPC/stdio protocol against a genuine client and server. Across 5 distinct MCP metadata surfaces we implement 8 concrete techniques with a deterministic, protocol-level harness. All 8/8 techniques deliver an attacker-controlled payload into the model's context, 4/8 evade a representative string-matching sanitizer, and exactly as the mechanism analysis predicts, only the TAG-block encoding (1/8) is invisible in the human approval view while still reaching the model verbatim. MCP forces re-approval for 0/8 techniques even under a time-of-check to time-of-use rug-pull. To test whether these outcomes are a property of the protocol or an artifact of one server codebase, we re-implement the catalogue against 3 independently developed Python MCP server libraries and find total agreement across all 32 cross-library outcome cells. The baseline sanitizer flags 0 of 25 benign descriptions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。