Join our Newsletter — 33% off our NHI Course
Home› Glossary› Threats, Abuse & Incident Response› LLM01 Prompt Injection
Threats, Abuse & Incident Response

LLM01 Prompt Injection

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: Threats, Abuse & Incident Response

LLM01 Prompt Injection is the top-ranked risk in the OWASP Top 10 for LLM Applications, where crafted input alters a model's behaviour or output in unintended ways. Direct injection comes from the user; indirect injection arrives through external content the model reads. Defenders constrain model privileges, separate trusted and untrusted content, validate outputs and require human approval for actions.

What Prompt Injection Means in LLM Systems

Prompt injection is not just “bad prompting”; it is an instruction-confusion problem. The model receives text that looks like data but is designed to influence behaviour, so the security boundary shifts from ordinary natural-language input to the model’s instruction hierarchy, content trust decisions, and downstream action policy.

This is why the same technique can appear as direct user input, indirect instructions embedded in retrieved documents, web pages, emails, tickets, or tool outputs. When the model cannot reliably separate trusted instructions from untrusted content, the attacker can redirect reasoning, leak context, or alter outputs in ways the application never intended.

Direct Injection vs Indirect Injection

Direct prompt injection is the simpler form: the attacker speaks to the model directly and tries to override the system prompt, policy, or task framing. Indirect prompt injection is more operationally important in real systems because the malicious instruction is hidden in content the model is later allowed to read, such as retrieved documents, search results, or integrated app data.

The indirect form matters because developers often trust their own retrieval or ingestion pipeline more than the original user. That trust can be misplaced when external content is treated as factual context but also contains executable-sounding instructions. Guidance on prompt injection prevention and layered defences is most useful when the application must decide which text is informational and which text is actionable.

Why Prompt Injection Becomes a Security Issue

The core security issue is not that the model “gets confused” in the abstract, but that confusion can cross a control boundary. If the model has access to private context, external tools, or action permissions, injected instructions can steer it toward disclosure, policy bypass, or unintended side effects. That is why LLM prompt injection often becomes an authorization and containment problem as much as a language-model problem.

For teams building gateways, agent wrappers, or retrieval layers, the practical question is how much authority the model can exercise over data, tools, and outputs. The AI Gateway and LLM Gateway Guide is relevant because routing, fallback, virtual keys, and guardrail policy all affect how far an injected instruction can travel.

Defensive Patterns That Reduce Exposure

Defence works best when it assumes the model will see hostile text. The main patterns are to isolate trusted instructions from untrusted content, minimise the model’s privileges, validate outputs before they trigger actions, and require human approval for high-impact steps. These controls do not “solve” the problem, but they shrink the blast radius and make abuse easier to block or detect.

Prompt injection also intersects with agent design, because tool access and delegated action increase the consequences of a successful injection. The Agentic AI Security Guide is useful when the model can browse, call tools, or act on retrieved content, while the OWASP Top 10 for LLM Applications Guide helps frame the risk alongside the rest of the LLM threat model.

Testing, Detection, and Review After Exposure

Prompt injection should be tested as a system property, not only as a prompt-writing exercise. Useful testing looks for instruction override, hidden instructions in retrieved content, data exfiltration paths, and cases where the model follows untrusted text over a higher-priority instruction. Detection is often behavioural: unusual refusal patterns, unexpected tool calls, context leakage, or output that mirrors attacker-controlled phrasing.

When a prompt injection event is suspected, responders should treat it as a content-trust incident and review what the model could read, what it could call, and what it was allowed to emit. The Prompt Injection Incident Response Playbook is a practical reference for quarantine, memory clean-up, and exfiltration-channel closure, while incident narratives such as EchoLeak (Microsoft 365 Copilot) 2025 show why post-incident review must include the model’s read scope as well as its visible output.

Standards & Framework Alignment

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

OWASP API Security Top 10 addresses the attack and risk surface, while OWASP ASVS, NIST AI 600-1 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP ASVSV15 — Secure Coding and ArchitecturePrompt injection is mitigated by architecture that separates trusted instructions from untrusted content.
Recommendation — Design prompt handling so untrusted content cannot override higher-priority instructions.
NIST AI 600-1GenAI ProfileThe GenAI profile addresses provenance, testing, and incident handling for LLM deployments.
Recommendation — Apply GenAI risk management practices to test prompts, outputs, and content provenance.
OWASP API Security Top 10API8 — Security MisconfigurationLLM integrations expose instruction and tool surfaces whose weak configuration can enable injection effects.
Recommendation — Harden exposed model and tool interfaces so hostile input cannot alter intended behaviour.
NIST SP 800-53 Rev 5SI-10 — Information Input ValidationPrompt injection depends on accepting untrusted text that influences processing and decisions.
AC-6 — Least PrivilegeInjected instructions are less damaging when the model and its tools have minimal authority.
Recommendation — Validate and constrain model inputs before they can influence downstream decisions. Restrict model and tool permissions to the minimum needed for the task.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org