深翼判例库DeepWing Case Library · INC-014 · 知识层Knowledge

伪造一条 Sentry 错误事件,就能劫持编程智能体:受控测试成功率 85%One forged Sentry error event can hijack a coding agent: 85% success in controlled tests

主失效层Primary failure layer:知识层Knowledge | 证据状态Evidence:多源已核Multi-source verified | 披露日期Disclosed:2026-06-12 | 核查日期Checked:2026-10-23

时间线Timeline

2026-06-03研究方已向 Sentry 披露该手法
2026-06-12Agentjacking 研究公开,受控测试成功率 85%
2026-06-03The technique had already been disclosed to Sentry
2026-06-12The Agentjacking research was published; 85% success in controlled tests

已证实事实Confirmed facts

手法:攻击者只需一个公开的 Sentry DSN,即可向目标项目注入伪造的错误事件。开发者让编程智能体经 MCP 查询未解决错误时,智能体把注入内容当作权威修复指引,以开发者本人权限执行攻击者命令。受控测试成功率 85%;研究称至少 2,388 家机构的 DSN 可被注入。

限定:这是研究演示与概念验证,未见在野利用确认。Sentry 承认披露,称平台层技术上无法根治,只封了具体载荷字符串。与 INC-029 同型对照:那边是向量库写入无鉴权,这边是错误事件写入无鉴权,病根都是「写进上下文的内容默认可信」。

With nothing more than a public Sentry DSN, an attacker can inject forged error events into a target project. When a developer asks a coding agent, via MCP, to look at unresolved errors, the agent treats the injected content as authoritative repair guidance and executes the attacker's commands with the developer's own permissions. Controlled tests succeeded 85% of the time, and the researchers found at least 2,388 organisations whose DSNs were injectable.

This is a research demonstration, with no confirmed in-the-wild exploitation. Sentry acknowledged the disclosure and said the platform cannot fully fix it, blocking only the specific payload strings. Compare INC-029: unauthenticated writes into a vector store there, into error events here; in both, whatever is written into context is trusted by default.

失效机制Failure mechanism深翼分析DeepWing analysis

失效点在知识层的入口:经检索与工具通道进入上下文的外部内容,被默认当作事实与指令。错误事件本来是「数据」,到了智能体眼里却成了「上级指示」,数据与指令之间没有边界检查。

因此本案归入知识层:凡是能写进智能体上下文的通道,都是攻击面;通道内容的可信等级要显式标注,指令性内容一律降级处理。

The failure is at the Knowledge layer's front door: external content arriving through retrieval and tool channels is treated as fact and as instruction by default. An error event is data, but to the agent it read as orders from above, with no boundary check in between.

Every channel that can write into an agent's context is attack surface. Trust levels must be explicit, and instructional content arriving through data channels is always downgraded.

工程启示Engineering lessons

外部内容一律不可信:经检索、工具与第三方通道进入上下文的内容按不可信处理,其中包含的指令不得直接执行。

修复类动作要确认:智能体执行修复、删除、部署类动作前,须有人确认或做来源校验。

写入面也要鉴权:错误事件、工单、向量库等「只写给系统看」的入口,与读取面同等鉴权。

Treat external content as untrusted: content entering context via retrieval, tools or third parties is untrusted; instructions inside it are never executed directly.

Confirm repair-class actions: fixes, deletions and deployments by an agent require human confirmation or source verification first.

Authenticate the write side too: error events, tickets and vector stores are written 'for the system'; they need the same authentication as the read side.

你的系统里,Agent 的对外动作有人盯着吗?Is anyone watching what your agents do outside your system?

做 17 题免费自检Take the free 17-question self-check

回到判例库Back to the Case Library →