By NHI Mgmt Group Editorial TeamBased on ThreatLocker: “Indirect prompt injection: How attackers manipulate AI agents through untrusted data” (August 26, 2026)

TL;DR: Indirect prompt injection lets attackers hide instructions inside emails, documents, webpages, APIs and memory so an AI agent may follow malicious commands during an ordinary workflow, according to ThreatLocker. The real risk is not the prompt alone but the access, tools and autonomy the agent already has when the injection lands.


At a glance

What this is: Indirect prompt injection is an attack in which hidden instructions inside untrusted content cause an AI agent to deviate from its intended task and perform unsafe actions.

Why it matters: It matters because AI agent governance now has to treat retrieved content, tool access and delegated privilege as one control problem, not separate ones.


Context

Prompt injection is a control failure created by a model that cannot reliably distinguish instructions from data once both arrive as natural language. The problem becomes acute when retrieval, memory and tool use are combined, because untrusted content can travel into the agent’s decision path without the user ever seeing it. Where the article builds on an agent identity model, agent identity model matters because authority is delegated at runtime, not just at sign-in.

Indirect injection is especially hard to govern in business workflows because the attack can hide inside routine assets such as email, documents, support tickets, calendar invites and API responses. That means the security boundary is not the prompt box alone but the entire context pipeline feeding the model. For most organisations, that starting position is already typical, not exceptional.


Key questions

Q: What breaks when an AI agent can turn untrusted content into privileged actions?

A: The trust boundary breaks because the agent no longer just reads external text. It can convert that text into tool calls, data access, and outbound transmission. Once that happens, classic assumptions about safe ingestion and human review no longer hold, and the control point shifts to pre-action authorisation, content trust, and destination restrictions.

Q: Why do AI agents make prompt injection more dangerous than chat-only tools?

A: AI agents are more dangerous because they can act, not just generate text. When a model can invoke tools, access records, or send messages, a hidden instruction can become a real enterprise action. The risk rises sharply if the agent inherits broad NHI permissions instead of narrowly scoped access.

Q: How do teams know whether prompt injection controls are actually working?

A: Look for end-to-end visibility across prompts, retrieved content, memory, tool calls, and outputs, plus evidence that blocked actions stay blocked under realistic test cases. If the system can only be evaluated with static prompts, the controls are probably too narrow. Behaviour drift under multi-turn workflows is the signal to watch.

Q: What is the difference between prompt injection and AI agent privilege abuse?

A: Prompt injection is the manipulation technique that tries to steer the model. AI agent privilege abuse is what happens when the agent can turn that manipulated decision into real actions because it has excess access, weak approval controls or unrestricted integrations. The first attacks the reasoning path, the second attacks the authority path.


Technical breakdown

How indirect prompt injection reaches the model context

Indirect prompt injection works when attacker-controlled text is fetched into the same context window as legitimate instructions. The model then receives two kinds of natural language at once: user intent and hostile content disguised as a document, email, webpage or retrieved record. Because LLMs are built to follow language patterns rather than strict command syntax, the model may treat the hidden instruction as authoritative unless the surrounding architecture separates data from control. This is why retrieval-augmented generation, memory, and multi-source context increase exposure. The core failure is not that the model reads text, but that it cannot inherently prove which text has authority. See the Agentic AI Security Guide.

Practical implication: separate untrusted content from system instructions and minimise which retrieved sources can influence agent decisions.

Why tool access determines impact after injection succeeds

Once a prompt is injected, the damage depends on the agent’s permissions, connectors and execution rights. A summariser with read-only access may only be manipulated into producing a bad answer, but an agent linked to email, file storage, scripting, cloud apps or internal databases can be pushed into data exposure, unauthorised messaging, record changes or external exfiltration. The attack is therefore an access problem as much as a model problem. In practice, the model creates the decision pressure, while tool scope decides whether that pressure becomes a security incident. This is the point where identity, privilege and workflow design converge. See the AI Agent Authorisation Guide.

Practical implication: scope every agent identity to the minimum tool set, data set and action set required for its job.

Why filtering alone cannot stop indirect prompt injection

Content filters can catch obvious phrases, but they cannot reliably eliminate every malicious variant. Attackers can rephrase instructions, split them across multiple fields, embed them in images, imitate system formatting, or leave them dormant until a later trigger activates the payload. That means prevention based only on keyword blocking or prompt policing is fragile. Defenders need controls that operate outside the model, including deterministic policy enforcement for destinations, commands and privilege changes. In security terms, the model may suggest an unsafe action, but the environment must remain the authority that decides whether the action can occur. Read Zero Trust for AI Agents.

Practical implication: enforce policy at the application, endpoint and identity layers rather than trusting the model to self-police.


Threat narrative

Attacker objective: The attacker aims to turn a routine AI workflow into a controlled action path that leaks information, changes data or executes unsafe tasks on their behalf.

  1. Entry occurs when attacker-crafted instructions are embedded in emails, documents, webpages or other content that an AI agent later processes as context.
  2. Credentialed escalation happens when the agent treats the hidden instruction as authoritative and uses its existing tools, integrations or permissions to follow it.
  3. Impact follows when those actions expose data, send unauthorised messages, modify records, launch applications or move information to an external destination.

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

Indirect prompt injection is a governance problem, not a language problem. The article shows that the dangerous moment is when untrusted content becomes part of the agent’s decision context and is treated as command authority. That means the control failure sits in context handling, delegation and tool mediation, not only in the prompt itself. Practitioners should treat every retrieved source as a potential control input unless its authority is explicitly constrained.

AI agents need identity boundaries before they need better prompts. The most important distinction in this article is between what the model can say and what the agent can do. When an agent has standing access to email, storage, scripting or SaaS data, a successful injection becomes an identity and privilege event, not just a bad output. Zero Trust for AI agents is the right mental model because verification, least privilege and per-action policy must frame the agent’s runtime authority.

Least privilege is necessary but not sufficient for agent safety. The article correctly separates access from autonomy, which is the more subtle governance issue. An agent may hold narrow permissions and still be dangerous if it can act repeatedly, chain tools, or send information outward without meaningful approval. Practitioners should therefore govern both scope and agency, because one without the other still leaves a viable abuse path.

Prompt injection reveals a new form of context trust gap. The named failure mode here is that systems often treat retrieved text as if it were both data and instruction at the same time. That ambiguity is exactly what attackers exploit, and it will persist wherever untrusted content flows into agent memory, retrieval layers, or multimodal inputs. Security teams should assume this trust gap is inherent and design for containment, not perfect detection.

Deterministic policy must sit outside the model if organisations want credible containment. The article’s strongest control insight is that the model cannot be its own policy engine. Validation of destinations, file paths, commands and privilege requests has to happen in surrounding infrastructure, because the model is the component under influence. For identity and AI governance teams, this is the point where runtime enforcement becomes more important than model confidence.

From our research library:

What this signals

Context trust gap: organisations now need to govern not only what an AI agent can access, but what it is allowed to believe. That shift matters because injected instructions often arrive through ordinary business content, which means the control point moves from prompt hygiene to runtime containment and identity-aware policy enforcement.

The practical programme change is clear: AI agent governance should converge with IAM, PAM and workload control rather than sit beside them as a separate AI project. If a system can read, decide and act across multiple tools, then delegated authority, approval boundaries and auditability become the real security perimeter.

Security teams should expect indirect prompt injection to become a recurring operational pattern wherever retrieval, memory and external connectors are combined. That makes agentic AI threat modelling relevant not because every model is autonomous, but because every context source can become an attack surface.


For practitioners

  • Implement task-scoped agent identities Assign each AI agent only the permissions required for its defined purpose, and separate read, write, modify and delete rights instead of inheriting a broad human account.
  • Separate untrusted content from system instructions Treat emails, documents, webpages, support tickets and retrieved records as untrusted inputs unless the architecture explicitly isolates them from authoritative prompts.
  • Enforce policy outside the model Use deterministic checks to approve or block outbound destinations, file operations, command execution and privilege changes before the action can run.
  • Restrict tools and integrations to the agent’s purpose Remove unnecessary connectors and expose narrow functions instead of general-purpose access to email, storage, scripting and SaaS systems.
  • Log the full agent workflow Record retrieved content, model output, tool calls, approval decisions, network activity and failed attempts so suspicious instruction paths can be reconstructed. See the AI Agent Observability, Audit and Incident Response Guide.

Key takeaways

  • Indirect prompt injection works because attackers can hide instructions inside content an AI agent later trusts as context.
  • The severity of the attack is governed by the agent’s permissions, autonomy and integrations, not by the prompt alone.
  • Runtime containment, least privilege and external policy enforcement are the controls that most directly reduce the blast radius.

Related NHI Mgmt Group resources: Agentic AI Security Guide · AI Agent Authorisation Guide · Zero Trust for AI Agents · AI Agent Observability, Audit and Incident Response Guide


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 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseThe article centres on AI agents being steered into misusing their identity and authority.
Recommendation — Apply ASI03 to restrict agent authority, approval scope and tool access before runtime actions occur.
OWASP Non-Human Identity Top 10NHI-04 — Insecure AuthenticationPrompt injection becomes dangerous when an agent can use its authenticated access to act on attacker instructions.
NHI-05 — Overprivileged NHIThe article repeatedly shows that excess access determines the impact of a successful injection.
Recommendation — Treat agent authentication paths as part of the attack surface and bind every action to a scoped identity. Reduce every agent to the minimum permissions needed for its task and separate read, write and delete rights.
NIST SP 800-53 Rev 5AC-6 — Least PrivilegeLeast privilege is the core mitigation against injected prompts turning into harmful tool use.
Recommendation — Enforce AC-6 so agents cannot escalate from a manipulated prompt into broad operational access.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsThe article is fundamentally about controlling what an AI agent is authorised to do after trust is gained.
Recommendation — Review and constrain entitlements so agent actions stay within explicit authorisation boundaries.

Key terms

  • Indirect Prompt Injection: Indirect prompt injection is an attack where malicious instructions are hidden inside content that an AI system reads later. The model may treat that content as context rather than as hostile input, which can influence tool use, data access, or workflow actions if controls are weak.
  • Activation Trust Gap: The activation trust gap is the difference between trusting data because it is protected and governing it because it is being reused. It appears when organisations move data from backup or archival systems into AI pipelines without reapplying access, sensitivity, and consumer controls.
  • Agent Autonomy: Agent autonomy is the degree to which an AI system can initiate actions, choose tools and advance work without human approval at each step. In governance terms, autonomy changes the control boundary because the actor can move from recommendation into execution inside a live session.
  • Runtime containment: A control approach that limits harmful behaviour while an AI agent is still active rather than waiting for post-incident review. It depends on signals such as anomalous tool use, privilege expansion, or unusual data access so security teams can intervene before blast radius grows.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, agentic AI identity and workload identity. It helps practitioners connect delegated access decisions to the controls that keep agents inside policy boundaries.
NHIMG Editorial Note
Published by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org