Agentjacking Attack Tricks AI Coding Agents Into Running Malicious Code

The 30-Second Skim
- What happened: Tenet Security researchers revealed "Agentjacking," a new attack that exploits Sentry's error-tracking platform to trick AI coding agents like Claude Code and Cursor into executing attacker-controlled code on developer machines, achieving an 85% success rate in controlled tests.
- Key facts & numbers: Tenet Security researchers Ron Bobrov, Barak Sternberg, and Nevo Poran disclosed "Agentjacking," which exploits a flaw at the intersection of Sentry's event ingestion (accepting arbitrary payloads from anyone with the DSN) and the Sentry MCP server (returning that data to AI agents as trusted system output). Sentry Data Source Names (DSNs) are the entry point: attackers find a target's public DSN, send a malicious error event with carefully formatted markdown that renders identically to Sentry's system template, and wait for a developer to prompt their AI agent to "fix unresolved Sentry issues." A successful exploit exposes environment variables, Git credentials, private repository URLs, and developer identities — running with the developer's full privileges without requiring phishing or prior server compromise.
- What happens next: Sentry's response: 'not technically defensible.' Hacker News is also covering a LangGraph agent RCE — AI coding assistants are becoming the soft underbelly.
- Tenet Security researchers Ron Bobrov, Barak Sternberg, and Nevo Poran disclosed "Agentjacking," which exploits a flaw at the intersection of Sentry's event ingestion (accepting arbitrary payloads from anyone with the DSN) and the Sentry MCP server (returning that data to AI agents as trusted system output).
- Sentry Data Source Names (DSNs) are the entry point: attackers find a target's public DSN, send a malicious error event with carefully formatted markdown that renders identically to Sentry's system template, and wait for a developer to prompt their AI agent to "fix unresolved Sentry issues."
- A successful exploit exposes environment variables, Git credentials, private repository URLs, and developer identities — running with the developer's full privileges without requiring phishing or prior server compromise.
- Tenet identified at least 2,388 organizations with valid injectable DSNs and tested the attack against 100+ organizations, achieving an 85% exploitation success rate against injected errors across widely used AI coding assistants.
Why It Matters
Sentry's decision not to fix the flaw, calling it "technically not defensible," leaves at least 2,388 organizations exposed through their own public DSNs. Because the attack rides entirely over trusted MCP responses and legitimate developer prompts, it evades every layer of traditional security infrastructure — turning the AI coding agent itself into the attack surface.
Sources Cited
- The Hacker News — Agentjacking Attack Tricks AI Coding Agents Into Running Malicious Code
Related Coverage
Ask SkimNews