Researchers have uncovered what they describe as a "new class of attack" that has the potential to exploit artificial intelligence coding agents, tricking them into executing arbitrary code on developers’ machines. This revelation comes from Tenet Security, a firm specializing in the security of autonomous AI agents. Their recent report highlights the technique known as "agentjacking," which takes advantage of a significant architectural flaw in Sentry, a widely-used application performance monitoring and error tracking tool prevalent among developers.
According to the findings published by Tenet Security, agentjacking attacks manipulate Sentry by injecting malicious commands into error events. These commands are engineered to appear indistinguishable from the tool’s own remedial suggestions. Consequently, when AI coding agents process Sentry’s error messages, they may inadvertently execute harmful instructions, resembling a form of indirect prompt injection attack.
The team at Tenet Security elaborated on the risks associated with this exploit in a detailed blog post. The crux of the problem lies in the implicit trust that AI agents place in the information they retrieve from Sentry. When these agents query the tool for unresolved errors, they receive responses and act on them as developers would. However, unlike human developers, AI agents possess no means to verify whether an error event originates from an actual system crash or has been artificially planted by an attacker. This uncritical acceptance of responses creates a dangerous pathway through which malicious data can directly lead to code execution.
A Step-by-Step Attack Methodology
The Tenet report meticulously outlines the methodology an attacker might employ to orchestrate such an attack:
-
Identification of Target: An attacker first locates a target’s Sentry Data Source Name (DSN), which is a public credential documented as safe for integration into frontend JavaScript applications.
-
Malicious Injection: The attacker sends a crafted error event to Sentry’s ingest endpoint using a simple POST request. This action doesn’t require any authentication beyond the DSN itself.
-
Crafted Content: The injected error event contains meticulously designed markdown in the message field and context key names. When this is returned to an AI agent via the Sentry Major Component Program (MCP) server, it is presented as visually structured content that closely resembles legitimate guidance from Sentry.
-
Agent Interaction: When a developer instructs their AI coding agent to “resolve unresolved Sentry issues” or phrasing to that effect, the agent follows up with Sentry via the MCP and retrieves the injected malicious event. With no basis for differentiation, it fails to determine this as non-genuine guidance.
- Execution of Malicious Code: The AI agent executes the code, which operates under the full privileges of the developer, bypassing standard security measures.
Targeting Trusted Tools
Tenet Security points out that the dangers of agentjacking stem largely from the fact that no phishing tactics are needed; Sentry’s DSN is specifically designed to be public and is embedded within frontend JavaScript. Because agents are unable to differentiate between authentic and fabricated guidance, once a payload is skillfully crafted, it could be infiltrated into numerous projects simultaneously, amplifying the threat.
In testing their hypothesis, the researchers confirmed that agentjacking is a viable threat against over 100 real-life targets, yielding an impressive 85% success rate on popular AI coding agents, including Claude Code, Cursor, and Codex. Their investigation also unveiled that at least 2,388 organizations currently have valid, injectable DSNs exposed to potential exploitation.
The ramifications of these attacks are profound. A single malicious instruction could provide unauthorized access to Continuous Integration/Continuous Deployment (CI/CD) pipeline credentials, open doors to private source code repositories, infiltrate cloud infrastructure, and establish persistent unauthorized access. Alarmingly, traditional security measures such as Endpoint Detection and Response (EDR) systems and web application firewalls are ineffective here, as there is often nothing overtly malicious to flag. Even AI agents have been found to execute payloads when instructed to disregard untrusted data.
In conclusion, while AI coding agents are revolutionizing software development, their automated systems’ implicit trust in tool responses signifies a new and critical attack surface. The convenience of having an AI assistant connected to observability platforms is countered by the risk of those very assistants being weaponized against developers. Tenet Security emphasizes that security leaders must acknowledge that MCP integrations represent a new frontier for attacks on the software supply chain. They urge decision-makers to carefully assess which tools their AI agents interface with, whether those tools handle untrusted data, and what safeguards are in place to prevent injected data from triggering malicious code execution.

