Join our Newsletter — 33% off our NHI Course

Malicious Prompt Injection

A malicious prompt injection is content designed to influence an AI system’s instructions, outputs, or actions in ways the user did not intend. It works by exploiting the model’s trust in retrieved or embedded text, especially when the system can call tools or access sensitive data.

Expanded Definition

Malicious prompt injection is a control-bypass technique aimed at AI systems that accept free-form input, retrieve external content, or execute tools. The attacker embeds instructions that compete with or override the system prompt, developer instructions, or task-specific policy. In practice, the risk grows when an AI agent can browse, summarise, retrieve, write files, send messages, or trigger downstream workflows.

Definitions vary across vendors because some teams treat this as a prompt-only issue, while others classify it as a broader agentic security problem. NHI Management Group treats prompt injection as a trust-boundary failure: untrusted text is being granted instruction-like influence. That makes it especially relevant to retrieval-augmented generation, workflow automation, and any environment where an OWASP Agentic AI Top 10 style control discussion applies.

The most common misapplication is assuming a clean prompt template alone prevents injection, which occurs when the system still passes untrusted content into a model without separating instructions from data.

Examples and Use Cases

Implementing prompt-injection controls rigorously often introduces friction in retrieval and automation pipelines, requiring organisations to weigh model usefulness against stricter content handling and approval gates.

  • A support chatbot summarises a ticket that contains hidden instructions telling the model to reveal policy text or internal notes.
  • An internal knowledge assistant retrieves a document with adversarial text that attempts to redirect the model from the user’s request to a malicious task.
  • An agentic workflow reads an email and is tricked into sending a reply, updating a record, or opening a case with attacker-controlled content.
  • A browser-enabled AI assistant encounters a webpage that tries to override the system role and instruct the model to ignore prior constraints.
  • A coding assistant ingests repository text or comments that attempt to exfiltrate secrets, alter output, or manipulate tool use.

These cases are especially dangerous when the model has authority beyond text generation. The attack becomes more than prompt tampering once it reaches actions, data access, or external side effects. Guidance from the OWASP Agentic AI Top 10 is useful here because it frames the issue as an application security concern, not just a model behaviour problem.

Why It Matters for Security Teams

Security teams need to treat malicious prompt injection as an exposure in system design, not a user-training issue. If untrusted input can influence decisions, the model may leak sensitive information, produce unsafe outputs, or invoke tools in ways that bypass intended approvals. That is particularly important for NHI and agentic AI environments, where service accounts, API keys, and delegated automation can turn a bad prompt into a real action.

The right response is layered: isolate instructions from data, constrain tool permissions, validate outputs before execution, and monitor for abnormal retrieval or action patterns. Governance also matters because teams must know which prompts, documents, and connectors are permitted to influence high-impact workflows. Without that boundary, the model becomes a conduit for policy inversion rather than a policy enforcement point.

Organisations typically encounter the consequences only after an agent sends the wrong message, exposes sensitive context, or triggers an unauthorised workflow, at which point malicious prompt injection becomes operationally unavoidable to address.

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 AI RMF, NIST AI 600-1 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 Covers prompt injection as a core risk in agentic AI systems.
NIST AI RMF Frames AI risks that arise when inputs can distort model behaviour.
NIST AI 600-1 Profiles GenAI risks including prompt-based manipulation and unsafe tool use.
OWASP Non-Human Identity Top 10 Relevant where injected prompts can coerce systems that use secrets or service identities.
NIST CSF 2.0 PR.DS Data security controls help limit exposure through retrieved or embedded content.

Set GenAI safeguards for prompt handling, retrieval boundaries, and action approval before deployment.