Security researchers have found a way to hijack AI coding agents with nothing but a fake bug report. They call it Agentjacking. It needs no malware, no stolen password, and no breach of the target.
The attack, disclosed by Tenet Security, turns the coding agent into the weapon. When a developer asks the agent to fix an error, the agent runs the attacker’s code instead, with the developer’s own privileges, on the developer’s own machine.
How the Agentjacking attack works
It starts with Sentry, a popular error-tracking tool. Sentry lets any app send it error reports using a public key called a DSN, which sits openly in website code by design.
An attacker POSTs a fake error to that endpoint. No password is needed. The report hides a “Resolution” section with a command, formatted to look exactly like Sentry’s own advice.
Coding agents read Sentry through the Model Context Protocol, the standard that lets agents pull in outside tools. The agent treats the response as trusted. It cannot tell a real crash from a planted one. So when the developer says “fix the unresolved Sentry issues,” the agent runs the attacker’s command.
The agent is the attack surface now
AI coding agents have gone from autocomplete to running terminals, and the market is booming; one vibe-coding startup recently hit $500m in revenue. That power is the problem.
The attack worked across the big agents. Tenet says it hijacked Claude Code, Cursor, and Codex, with an 85 per cent success rate in controlled tests. It found 2,388 organisations exposed, from a $250bn enterprise down to solo developers, and even a cloud-security vendor.
The payoff for an attacker is severe. One injected error can reach environment variables, AWS keys, GitHub tokens, git credentials, and private repository URLs. From there, the path runs to CI/CD pipelines and cloud infrastructure.
The scariest part is what does not catch it. The attack slips past EDR, firewalls, IAM, and VPNs, because nothing in the chain is unauthorised. Tenet calls it the “Authorised Intent Chain.” Prompts do not help either. The agents ran the code even when told to ignore untrusted data.
Nobody wants to own the fix
Tenet told Sentry on 3 June. Sentry acknowledged the problem but declined to fix it at the root, calling it “technically not defensible.” It added a filter to block one specific payload string, which treats the symptom, not the cause.
That standoff is the real story. The flaw is not in Sentry alone. It is in how agents handle any outside data, so the same risk runs through support tickets, GitHub issues, and documentation. A separate test recently phished an AI email agent into leaking AWS keys.
The lesson lands as enterprises rush to put agents into production. An agent wired into your tools is also a new way in. As Tenet puts it, the only place left to stop this is the moment the agent decides to act.


