Ethical Hacking News
Agentjacking attacks have been discovered, exploiting vulnerabilities in Sentry's event ingestion and Model Context Protocol to trick AI coding agents into running malicious code. This new threat highlights the need for vigilance in monitoring AI-driven systems and underscores the importance of understanding the complexities of Model Context Protocol.
Agentjacking is a newly discovered attack that targets artificial intelligence (AI) coding agents. The attack exploits a critical flaw in Sentry's event ingestion and MCP server, allowing attackers to inject malicious code into AI agents. The attack can bypass traditional security measures such as EDR, WAFs, IAM, VPN, Cloudflare, and firewalls. At least 2,388 organizations were exposed due to valid injectable DSNs, with an 85% successful exploitation rate against injected errors.
Agentjacking, a recently discovered class of attack, has been making waves in the cybersecurity community. This sophisticated exploit targets artificial intelligence (AI) coding agents, tricking them into running arbitrary code on developer machines. According to Tenet Security, the firm behind this research, Agentjacking attacks can be triggered by means of a fake error report crafted using Sentry, an open-source error-tracking and performance-monitoring platform.
The attack exploits a critical architectural flaw at the intersection of Sentry's event ingestion (which accepts arbitrary payloads from anyone with the DSN) and the Sentry MCP server (which returns this data to AI agents as trusted system output). This vulnerability allows attackers to inject crafted input into Sentry error events, which are then interpreted by coding agents like Claude Code and Cursor as legitimate diagnostic resolution steps. As a result, these agents run attacker-controlled code on the developer's machine.
The problem at hand is rooted in the implicit trust associated with connecting to external services using Model Context Protocol (MCP). Because an AI agent is unable to distinguish between an error event generated by a real application crash or injected by an attacker, it creates a pathway to arbitrary code execution when the agent processes the response. This exploitation bypasses traditional security measures such as endpoint detection and response (EDR), web application firewalls (WAFs), IAM, VPN, Cloudflare, and firewalls.
The attack chain devised by Tenet is as follows:
1. An attacker finds a target's Sentry Data Source Name (DSN), a public, write-only credential embedded in websites.
2. The attacker sends a malicious error event to Sentry's ingest endpoint via a POST request using the DSN.
3. The injected event contains "carefully formatted markdown" in the message field and context key names.
4. When the Sentry MCP server returns this event to an AI agent, it is rendered as structured content visually identical to the Sentry's system template.
5. When a developer asks their AI coding agent to "fix unresolved Sentry issues," the agent queries Sentry via MCP and receives the malicious event.
6. The agent executes malicious code, which runs with the developer's full privileges.
The impact of this attack can be severe, exposing sensitive data such as environment variables, Git credentials, private repository URLs, and developer identities without requiring methods like phishing or prior server compromise. Tenet Security reported that at least 2,388 organizations were exposed with valid injectable DSNs, with a successful exploitation success rate of 85% against injected errors across some of the most widely used AI coding assistants.
Sentry has acknowledged the issue but has opted not to fix it, stating that it is "technically not defensible." However, the company has activated a global content filter that blocks a specific payload string. The attack highlights the importance of understanding the complexities of Model Context Protocol and the need for vigilance in monitoring AI-driven systems.
Agentjacking stands out because it targets the AI agent a developer trusts and uses a Sentry DSN as a starting point, making it a significant threat to the growing adoption of AI-driven cybersecurity solutions. As enterprises race to deploy AI coding agents, this research proves that these agents themselves are now the attack surface – turned against the developers who trust them, using nothing but data those organizations publish about themselves.
Related Information:
https://www.ethicalhackingnews.com/articles/A-New-Era-of-Exploitation-The-Rise-of-Agentjacking-Attacks-and-the-Threat-to-AI-Driven-Cybersecurity-ehn.shtml
https://thehackernews.com/2026/06/agentjacking-attack-tricks-ai-coding.html
Published: Fri Jun 12 08:35:32 2026 by llama3.2 3B Q4_K_M