Traditional input validation helps, but it does not solve the core problem. Prompt injection can be hidden in plain language, encoded text, documents, images, or retrieved content, so malicious instructions may still reach the model. Security teams need layered controls, including least privilege, response filtering, and continuous monitoring, rather than assuming sanitisation is enough.
Why This Matters for Security Teams
Traditional input validation is designed to catch malformed or obviously unsafe input, but prompt injection often looks like ordinary language, retrieved content, or instructions embedded in files and web pages. That means the payload can pass sanitisation and still influence the model’s next action. The problem is not just text handling; it is that an agent or model may treat untrusted content as operational guidance. Current guidance from the OWASP Agentic AI Top 10 treats this as a control failure, not a parsing bug.
For NHI and agentic AI security, that changes the defensive model. A model can be fully “validated” at the input boundary and still be steered into exposing secrets, calling tools, or retrieving sensitive data from connected systems. NHIMG research on the Gemini AI Breach — Google Calendar Prompt Injection shows how hidden instructions in trusted content can bypass naive filtering. In practice, many security teams encounter prompt injection only after an agent has already read, trusted, and acted on the malicious content.
How It Works in Practice
Prompt injection succeeds because the model does not experience “input” the same way a web application does. It reasons over language, context, and retrieved material, so a malicious instruction can be buried inside a support ticket, document, email, image caption, or search result. If the agent has tool access, that instruction may cascade into data exfiltration or unsafe actions even when the raw input never contains a classic exploit string.
Input validation still has value, but only as one layer. Security teams need to pair it with runtime controls that reduce what the model can do if it is misled:
- Use least privilege for tools and connectors so the model cannot reach everything by default.
- Separate untrusted content from system prompts and policy instructions.
- Apply response filtering and output gating before the agent can send data externally.
- Monitor tool calls, retrieval paths, and abnormal action sequences continuously.
- Limit secrets exposure, because injected prompts often aim to extract tokens or credentials.
This is where NHI governance becomes practical. If a model or agent can invoke APIs, it needs tightly scoped identity, short-lived credentials, and clear revocation paths, not broad standing access. NHIMG’s Ultimate Guide to Non-Human Identities shows why overprivileged NHIs and poor secret hygiene create the conditions prompt injection exploits. The issue also aligns with the OWASP view that agentic systems need defence in depth, not content filtering alone. These controls tend to break down when agents are allowed to chain multiple tools across systems because a single poisoned instruction can propagate into repeated unsafe actions.
Common Variations and Edge Cases
Tighter filtering often increases false positives and operational overhead, so organisations must balance reduced injection risk against usability and workflow friction. There is no universal standard for prompt injection detection yet, and current guidance suggests treating it as an orchestration and authorisation problem as much as a content problem.
Some environments are harder to defend than others. Retrieval-augmented generation systems inherit risk from every indexed document, so validation at the user boundary misses hostile content already inside the knowledge base. Multi-agent workflows are even more fragile because one compromised agent can seed another with malicious instructions. The Amazon Q AI Coding Agent Compromised case illustrates how autonomous execution changes the blast radius. When agents process external content, manipulate files, or call internal tools, sanitising only the first prompt is insufficient. Teams should assume that any downstream content source can become an attack path and design policy checks, tool scoping, and human approval steps accordingly.
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, CSA MAESTRO and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | A1 | Prompt injection is a core agentic AI attack class. |
| CSA MAESTRO | CCM-06 | Covers prompt and context abuse in agent workflows. |
| NIST AI RMF | GOVERN | AI RMF governance addresses accountability for unsafe model behavior. |
| OWASP Non-Human Identity Top 10 | NHI-05 | Overprivileged NHIs make prompt injection more damaging. |
| NIST CSF 2.0 | PR.AC-4 | Least privilege limits what compromised agents can access. |
Treat untrusted content as adversarial and gate tool use behind runtime policy checks.
Related resources from NHI Mgmt Group
- Should organisations rely on model safety features alone to stop prompt injection?
- What breaks when organisations rely on single-prompt red teaming alone?
- What breaks when organisations rely on account deactivation alone to stop access?
- What breaks when organisations rely only on prompt injection classifiers to protect AI workflows?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 27, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org