By NHI Mgmt Group Editorial TeamBased on Swarmnetics: “Agentjacking Attack Exposes Critical Trust Flaw in AI Coding Agents” (June 23, 2026)

TL;DR: Agentjacking abuses trusted error-report inputs in AI coding agents, letting attackers with a publicly exposed Sentry DSN inject malicious instructions and steal secrets, according to Swarmnetics and Tenet Security. The core flaw is assumption, not hygiene: systems built to process trusted telemetry cannot safely treat agent-directed execution as if source trust still equals action trust.


At a glance

What this is: Agentjacking is an input-trust attack on AI coding agents that uses forged error reports to push malicious instructions through MCP-connected workflows.

Why it matters: IAM and security teams need to treat AI coding agents as delegated execution endpoints, because trusted data channels can become control channels when agents can act on them.

By the numbers:

  • Tenet Security says the attack achieved an 85% success rate overall across many different types of setups and AI coding agents.
  • Swarmnetics says 2,388 organizations were exposed during testing of the attack.
  • The researchers found over 100 AI coding agents susceptible to agentjacking.

Context

Agentjacking is a trust-boundary failure in AI coding agents that consume external telemetry and then take action on it. The risk is not limited to malformed input. It appears when an agent treats a report, alert, or ticket as authoritative enough to execute instructions embedded inside the payload.

In this case, the source article describes Sentry MCP integrations as the delivery path and a publicly exposed Sentry DSN as the access point for submitting the forged report. That combination matters for identity governance because the agent is acting on delegated trust, not on human-reviewed intent, and the consequence is secret theft rather than simple message abuse.

The pattern is atypical in scale but typical in structure for non-human identity failures: a broadly trusted interface, weak source validation, and downstream execution without a reliable authenticity check.


Key questions

Q: What breaks when an AI coding agent trusts external error reports too much?

A: The trust boundary breaks. If a report channel can carry attacker instructions and the agent can act on them with repository or secret access, the system is no longer separating observation from authority. That creates a governance failure, because the attacker is influencing execution through a channel that was assumed to be informational only.

Q: Why do publicly exposed telemetry credentials create agent security risk?

A: Because they often let anyone submit content into a workflow the agent treats as authoritative. If the agent can then act on that content, the credential is effectively part of the control path. The risk is not the credential alone, but the authority it grants over the agent’s decision inputs.

Q: What are the signs that an AI coding agent is too permissive with MCP inputs?

A: Look for agents that can move directly from inbound reports to repository reads, token lookups, cloud calls, or code changes without a separate approval step. Another warning sign is when the same inbound channel carries both diagnostics and instructions, because that makes malicious text hard to distinguish from legitimate context.

Q: How should teams govern AI-assisted development workflows that use coding agents?

A: Treat them as identity-governed execution paths, not just productivity tools. Define who can start the workflow, which tools and data sources it can reach, what evidence is required for review, and how access is revoked if the workflow expands beyond its intended scope. The key is to govern the chain of delegated action, not only the final code output.


Technical breakdown

How forged telemetry becomes execution input

AI coding agents that ingest incident reports often treat the report body as operational context. When the workflow is built to respond automatically, the agent can interpret malicious text inside a report as instructions to run commands, inspect repositories, or fetch credentials. In MCP-connected setups, the tool path makes this more dangerous because the agent is not just reading the report, it is able to act on it through integrated tools. The core mechanism is not code execution in the classic exploit sense. It is trusted-input abuse, where the source system is presumed to be a safe origin for action-driving content.

Practical implication: separate diagnostic text from action-bearing instructions before any agent can use the content.

Why a public DSN changes the attack surface

A Sentry DSN is intended to identify the destination for telemetry, not to protect confidentiality in the way a secret key does. When that credential is exposed in public code, logs, or searchable content, anyone can submit crafted reports to the target. That widens the intake surface from internal observability to internet-reachable instruction injection. The security mistake is assuming that a reporting endpoint is only a sink. Once an agent consumes the sink and performs work from it, the endpoint becomes part of the control plane for agent behaviour.

Practical implication: inventory and protect telemetry ingress points as control surfaces, not just monitoring endpoints.

Why sandboxing does not fix the trust problem

The article says sandboxing does not stop the attack because the agent is not abusing a local privilege boundary in the usual way. It is being persuaded to act within its permitted workflow, using legitimate tools and valid context. That makes the failure structural. The trust model assumes the agent can safely decide which external inputs deserve execution, but the attack exploits that decision point itself. In identity terms, the problem is not only access. It is source trust that has been extended too far into runtime decision-making.

Practical implication: contain the decision to act on external input before tool use, not after execution starts.


Threat narrative

Attacker objective: The attacker aims to turn trusted error intake into a secret-exfiltration and access-expansion path against AI coding environments.

  1. Entry occurs when an attacker finds a publicly exposed Sentry DSN and submits a forged error report to the target environment. The report is accepted as trusted telemetry by the AI coding agent.
  2. Credential access follows when the agent processes the malicious report and is steered toward secrets, including AWS keys, GitHub tokens, Sentry auth tokens, and git credentials.
  3. Escalation and impact occur when the stolen material is exfiltrated and used to expand access into repositories, cloud resources, and developer identities, turning a single report into broader compromise.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Trusted telemetry is not a safe identity boundary: Swarmnetics' report shows that AI coding agents can turn observability inputs into execution triggers when the upstream source is assumed to be trustworthy. That assumption was built for human-reviewed monitoring workflows, not for software that can act on the content it receives. The implication is that identity governance must treat report intake as an authorisation decision point, not a passive data flow.

Agentjacking exposes a source-trust assumption collapse: The Sentry DSN model assumes anyone can submit an error report, but that report will not become an operational directive. That assumption fails when the recipient is an AI coding agent with tool access and permission to execute follow-on actions. The implication is not simply tighter filtering; it is rethinking where trust ends and runtime agency begins.

Public credentials are now control-plane exposure, not just leakage: The attack shows that a publicly visible ingestion credential can become enough to manipulate downstream behaviour even when it is not a high-value secret in the classic sense. This is why NHI governance has to distinguish between authentication to receive data and authority to direct action. Practitioners should classify exposed telemetry credentials as potential control-path dependencies, not harmless metadata.

MCP expands the blast radius of delegated execution: Once an AI coding agent is connected to MCP tools, malicious context can travel from a report into repositories, tokens, and cloud systems without a traditional intrusion event. That means conventional detections focused on unauthorized login or obvious malware may miss the abuse entirely. Practitioners need governance that follows tool-enabled delegation, not just account compromise.

Agentic trust debt is the right concept here: The ecosystem accumulated integrations before agents were expected to consume them autonomously, so old assumptions about who can speak to a system still shape modern runtime behaviour. This creates trust debt, where inherited input channels silently carry more authority than they should. The practical conclusion is that teams must map which inputs can still become actions inside agent workflows.

From our research library:

  • Claude Code-assisted commits leaked secrets at a rate of 3.2%, more than double the human-only baseline of 1.5%, with peaks reaching 31 secrets per 1,000 commits in August 2025, according to the State of Secrets Sprawl 2026.
  • 24,008 unique secrets were exposed in MCP configuration files in 2025 alone, the protocol's first year of widespread adoption, according to the State of Secrets Sprawl 2026.
  • Read next: MCP Security Guide

What this signals

Agentjacking is a runtime trust problem, not just a bad-input problem: AI coding agents that consume external telemetry need a boundary between reading and acting, because the attack succeeds when those two steps are collapsed into one workflow. MCP Security Guide is the right reference point for mapping where the tool boundary sits in your environment.

Trusted inputs can become delegated authority: When a report can steer tools, repositories, or cloud actions, the organisation has effectively given the input channel more authority than the operator intended. That changes how teams should think about AI agent authorisation and which actions must require explicit approval.

Agentic trust debt: old integration patterns assumed that telemetry would be consumed by humans, not autonomous or semi-autonomous systems. The result is a governance backlog where action-capable agents inherit permissive inputs faster than security teams can reclassify them.


For practitioners

  • Audit agent intake points for action-bearing context Map every external input that an AI coding agent can read, interpret, or act on, especially incident reports, alerts, and ticketing feeds.
  • Treat public telemetry credentials as sensitive access paths Search code, repositories, and exposed endpoints for DSNs and similar intake credentials that allow anyone to submit content to a trusted workflow.
  • Separate diagnostic content from executable instructions Strip or neutralise embedded command-like text before the agent can use report content to trigger tools, queries, or remediation steps.
  • Restrict tool access behind explicit approval gates Require human or policy approval before an agent can move from reading an external report to opening repositories, tokens, or cloud operations.
  • Model MCP-connected agents as delegated identities Inventory which agents can reach which tools, then review those links as identity and privilege relationships rather than as simple integrations.

Key takeaways

  • Agentjacking works because trusted telemetry is being used as a command path for AI coding agents, not because the attacker breaks into the system in a conventional way.
  • Swarmnetics says the attack affected over 100 agents, exposed 2,388 organisations, and reached an 85% success rate in testing, which shows how broadly the trust flaw can scale.
  • The most relevant control is to separate report ingestion from execution authority so that external input cannot directly drive tools, secrets access, or repository actions.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10, OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI09 — Human-Agent Trust ExploitationThe article centres on malicious instructions hidden inside trusted inputs to steer agent behaviour.
ASI03 — Identity & Privilege AbuseThe attack abuses delegated tool authority and over-trusted runtime permissions.
Recommendation — Redesign agent input handling so untrusted content cannot become an execution trigger. Review agent tool grants as privileged identities and remove unnecessary execution paths.
OWASP Non-Human Identity Top 10NHI-02 — Secret LeakageThe attack seeks exposed tokens, keys, and credentials as exfiltration targets.
NHI-04 — Insecure AuthenticationA public DSN and weak source validation let unauthorised parties inject trusted-looking content.
Recommendation — Scan agent workflows for exposed secrets and treat any discovery as a governance incident. Harden inbound authentication and validate which sources are allowed to influence agent actions.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementExposed DSNs and downstream secrets are credential lifecycle issues in agent-connected systems.
Recommendation — Rotate and revoke exposed authenticators and ensure inbound credentials are not treated as harmless metadata.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementThe attack path uses credential theft to expand from the agent into broader environments.
Recommendation — Map agentjacking detections to credential access and lateral movement indicators across connected systems.
NIST Zero Trust (SP 800-207)5.4 — Access enforcement and least privilegeZero Trust applies because trust must not flow from input source to action authority.
Recommendation — Apply least-privilege enforcement between input channels, agent reasoning, and tool execution.

Key terms

  • Agentjacking: An attack pattern where a malicious party feeds deceptive content into an AI agent workflow so the agent carries out the attacker’s intent. The risk is not only prompt manipulation, but the use of trusted tool channels and credentials to turn ordinary input into unauthorized action.
  • MCP Integration: An MCP integration is a connection between an AI agent and a tool or data source through Model Context Protocol. The protocol itself does not solve governance. Security teams still need to bind each integration to a specific identity, define the scope of access, and preserve auditability for every action.
  • Delegated Execution: Delegated execution is when software is allowed to perform actions on behalf of a user, process, or business function. In NHI governance, the risk is that the delegated actor may chain actions beyond the original intent, so controls must focus on scope, approval, and revocation.
  • CI trust boundary: The CI trust boundary is the set of systems, credentials, and actions that a build or deploy pipeline can legitimately affect. When a job can sign code, call internal APIs, or deploy artifacts, it belongs inside the identity model and must be governed accordingly.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are responsible for identity security strategy or NHI governance in your organisation, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on July 14, 2026.
Updated on October 13, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org