By NHI Mgmt Group Editorial TeamDomain: AI SecuritySource: PromptfooPublished September 28, 2025

TL;DR: AI agents that can read private data, process untrusted content, and send data externally create a prompt-injection path to exfiltration, according to Promptfoo’s analysis of the “lethal trifecta” and red-teaming workflow. The control problem is not model cleverness but limiting the combined trust, content, and output conditions that let malicious instructions become data loss.


At a glance

What this is: This is an analysis of the AI agent “lethal trifecta”, where private data access, untrusted input, and external communication combine to create prompt-injection and exfiltration risk.

Why it matters: It matters because IAM, NHI, and AI security teams need to govern agent permissions, data exposure, and outbound channels as one control surface rather than treating them separately.

By the numbers:

👉 Read Promptfoo’s guide to testing the AI agent lethal trifecta


Context

AI agent security fails when access, input, and output are governed as separate problems. The lethal trifecta described in this article is a practical way to think about that failure, because it shows how an agent can be induced to turn legitimate access into data exposure. In identity terms, the question is not only what the agent can do, but what it can read, what it will process, and where it can send results.

That matters for IAM and NHI programmes because AI agents behave like privileged non-human identities with delegated reach across data and tools. If outbound channels and untrusted content are not bounded, access reviews alone will not catch the risk. For practitioners, this is a control-design problem, not a prompt-tuning problem.

Prompt injection and data exfiltration are now recurring patterns in agentic AI systems, which is why teams need to treat agent permissions as a lifecycle issue. The right response is to reduce standing capability, constrain trust boundaries, and test the system as an adversary would. The article’s starting point is typical for teams moving from experimentation to production.


Key questions

Q: What breaks when an AI assistant can access private data and untrusted content at the same time?

A: When an assistant can access private data and ingest untrusted content, a small injected instruction can become a data-exfiltration path. The usual assumption that content is passive fails, because the model can interpret it as an operational command and move it into tool execution.

Q: Why do autonomous agents create a bigger governance problem than chat-based AI assistants?

A: Chat-based assistants usually begin with a visible human prompt, so the initiation point is easier to govern and audit. Autonomous agents can start from external events, which means the triggering condition, payload, and connector become part of the identity attack surface. That expands the control problem beyond prompt content alone.

Q: What do security teams get wrong about prompt engineering for AI agents?

A: They often assume better wording is enough to create reliable control. In practice, prompt style can help, but it does not create a secure boundary when the agent is still free to reinterpret context. Real governance comes from structure, validation, and constrained action paths.

Q: How can teams reduce AI leakage risk without slowing adoption?

A: By designing for containment and recovery instead of relying on perfect prevention. That means isolating sensitive data sources, tightening access to retrieval layers, and preparing purge or restore workflows for accidental disclosure. This approach keeps AI usable while reducing the blast radius when content escapes its intended context.


Technical breakdown

Why the lethal trifecta creates agentic AI exposure

The lethal trifecta combines three conditions: access to private data, exposure to untrusted content, and a path to send data out. Each condition is normal on its own, but together they create an instruction-following trap, because the agent can be manipulated through poisoned content into disclosing what it can already read. In security terms, this is an access-control failure wrapped inside a content-processing workflow. The model is not “hacked” in the classic sense. Instead, its delegated capabilities are redirected through prompt injection into exfiltration. That is why agent security has to be treated as both identity governance and API governance.

Practical implication: remove at least one side of the trifecta wherever possible, especially outbound exfiltration paths.

How indirect prompt injection bypasses normal guardrails

Indirect prompt injection places malicious instructions inside content the agent is asked to process, such as a document, email, or web page. The agent then treats the attacker’s text as if it were part of the task context, which is why simple refusal prompts or keyword filters are unreliable. A robust design needs deterministic controls around tool use, output channels, and content provenance. For AI systems with delegated access, this also becomes a non-human identity problem: the agent’s access scope must be smaller than the data it can technically reach, and its tool permissions must be separate from its reading permissions.

Practical implication: separate read, reason, and send permissions so untrusted content cannot trigger uncontrolled disclosure.

Why red-teaming with Promptfoo matters for AI agents

Promptfoo is being used here as a test harness for adversarial evaluation. The value is not the tool itself, but the discipline of simulating malicious inputs and checking for secret leakage, unauthorized actions, and failed refusals. That aligns with modern AI governance practice, where testing needs to be repeatable and policy-driven rather than anecdotal. For teams operating AI agents, the key architectural insight is that security tests must cover the whole agent loop: context ingestion, model reasoning, tool invocation, and output release. If any one of those stages can be bypassed, the control is incomplete.

Practical implication: build recurring red-team tests around the full agent loop, not just the prompt layer.


Threat narrative

Attacker objective: The attacker wants the agent to reveal private data or relay it through an outbound channel without triggering a human approval step.

  1. Entry occurs when a malicious document, webpage, or email is ingested by the AI agent as untrusted content.
  2. Escalation happens when the injected instruction persuades the agent to access private data and prepare a response or tool action.
  3. Impact follows when the agent sends the sensitive content out through chat output, email, or another external channel.

NHI Mgmt Group analysis

The lethal trifecta is really an identity governance failure, not a model-quality issue. When an AI agent can read private data, ingest hostile content, and exfiltrate output, it is operating like a delegated non-human identity with insufficient boundaries. That means traditional access review alone is too slow and too abstract to control the risk. The real governance task is to define what the agent may read, what it may process, and what it may send. Practitioners should treat agent scope as a lifecycle control, not a one-time setup decision.

Prompt injection becomes materially worse when outbound channels are treated as harmless utility functions. Many teams focus on the model prompt and ignore the send path, but the exfiltration channel is what turns manipulation into loss. In practice, this is where least privilege for AI tools meets NHI governance, because the agent should not have the same communication rights as the user it serves. The control gap is standing capability across tool, data, and transport layers. Practitioners should separate those layers and prove the separation under test.

AI red-teaming is becoming a control validation requirement for agentic systems. A one-time policy review cannot capture the endless ways malicious instructions can be phrased, nested, or disguised. That is why the combination of adversarial tests, deterministic API constraints, and output filtering should be used as a recurring assurance loop. For identity teams, this maps cleanly to NHI assurance: if the agent can act, it must be testable, observable, and revocable. Practitioners should demand evidence of those three properties before deployment.

Named concept: the instruction-to-exfiltration gap is the failure mode teams miss. The article shows how a harmful instruction can survive ingestion, survive model reasoning, and only become visible when data leaves the environment. That gap is where governance assumptions break down, because many controls assume detection happens before disclosure. In AI agent programmes, the control objective is to collapse that gap with constrained tools, provenance checks, and explicit outbound policy. Practitioners should design for containment before content ever reaches the model.

What this signals

AI agents will increasingly need to be governed as privileged non-human identities, with explicit limits on what they can read, reason over, and send. The practical signal for identity programmes is that access scope, tool scope, and egress scope now have to be reviewed together. This is where NHI governance starts to overlap with agentic AI assurance, and where policy without testing will not hold.

Instruction-to-exfiltration gap: the next control gap in agentic AI is not whether a model can be tricked, but how far the trick can travel before containment stops it. That makes outbound policy, provenance controls, and runtime observability the more useful measures for the next phase of adoption. Teams that can prove agent revocation and tool isolation will have a clearer operational boundary than teams relying on prompt hygiene alone.

For programmes handling sensitive data, the best near-term signal of maturity is not model accuracy but whether a dummy secret can survive adversarial testing. If it can, the agent still has an open disclosure path. If it cannot, you have evidence that your AI workflow is being governed as a system of identities and permissions rather than a conversational interface.


For practitioners

  • Constrain the agent’s outbound paths Disable unnecessary email, HTTP, messaging, and file-transfer tools for any agent that processes untrusted content. If the system cannot exfiltrate, prompt injection becomes far less dangerous even when the model is tricked.
  • Separate private data from untrusted context Keep confidential notes, database records, and external documents in distinct pipelines so the agent cannot combine them without explicit policy checks. The goal is to prevent a poisoned document from becoming a bridge to sensitive data.
  • Test the full agent loop with adversarial prompts Use red-team cases that verify read access, tool invocation, and output filtering together, not as isolated checks. Include indirect injection payloads that try to make the agent reveal a dummy secret or call an external endpoint.
  • Apply least privilege to AI tool permissions Give the agent only the minimum permissions needed for the task, and keep those permissions narrower than the human operator’s default access. Review tool scopes separately from model prompts and revalidate them after every workflow change.

Key takeaways

  • AI agents become materially more dangerous when private data access, hostile inputs, and outbound communication are combined in one workflow.
  • The core issue is governance of delegated capability, because the exfiltration path, not the prompt alone, turns manipulation into loss.
  • Teams should reduce standing agent scope, separate sensitive data from untrusted content, and validate controls with repeatable red-team tests.

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 MITRE ATT&CK address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10NHI-01The article centers on agent prompt injection and tool abuse.
NIST AI RMFGOVERNGovernance, accountability, and testing are the core issues in this post.
NIST CSF 2.0PR.AC-4The article focuses on access scope and how it is abused.
NIST SP 800-53 Rev 5AC-6Least privilege is the central control for reducing agent blast radius.
MITRE ATT&CKTA0006 , Credential Access; TA0010 , ExfiltrationThe described attack path moves from content abuse to data theft.

Map prompt-injection scenarios to credential access and exfiltration tactics to prioritise containment tests.


Key terms

  • Lethal Trifecta: A risky AI agent condition where one system can read private data, consume untrusted content, and communicate externally. When those three capabilities overlap, the agent can be tricked into disclosing sensitive information through legitimate tools without a conventional exploit.
  • 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.
  • Agent Egress Control: Agent egress control is the governance of where an AI agent can send data, which tools it can call, and what external destinations it may reach. It is essential when agents can transform internal information into outbound requests that may leak sensitive content or trigger unintended actions.
  • Non-Human Identity (NHI): A digital identity assigned to a non-human entity such as a software application, service account, API key, bot, machine, or AI agent that enables it to authenticate and interact with systems without direct human involvement. NHIs now outnumber human identities in most enterprises by 25 to 50 times.

What's in the full article

Promptfoo's full article covers the operational detail this post intentionally leaves for the source:

  • A step-by-step red-team configuration for prompt injection testing in promptfooconfig.yaml
  • A custom trifecta test harness that uses dummy secrets and malicious documents to detect leakage
  • Practical run and report workflow examples for identifying unauthorized disclosure attempts
  • Operational mitigation ideas such as sandboxing, output monitoring, and capability reduction

👉 Promptfoo’s full post shows the red-team setup, example payloads, and mitigation workflow.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps practitioners apply identity controls to systems that act, not just users that log in.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 2, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org