AI Guide

Prompt Injection: How attackers hijack AI agents through hidden instructions

Prompt injection is an attack that embeds malicious instructions inside content an AI system processes, such as an email, document, or web page, to override its intended behavior. As AI agents gain write access to enterprise systems, injection shifts from a text-generation nuisance to a direct route into ERP, CRM, and email. Learn below how the attack works, which defenses enterprises use, and how it connects to EU AI Act resilience requirements.

Key Facts
  • Prompt injection has ranked #1 in the OWASP Top 10 for LLM Applications for two consecutive editions
  • CrowdStrike's 2026 Global Threat Report found manipulated prompts injected into legitimate GenAI tools at more than 90 organizations during 2025
  • 52% of German companies cite a lack of rules and control as their top AI concern, per Bitkom's 2026 KI-Studie
  • Indirect injection hides instructions inside emails, documents, or web pages an AI agent reads, requiring no interaction with the AI system's interface
  • Article 15 of the EU AI Act requires high-risk AI systems to resist third-party attempts to exploit vulnerabilities and alter their behavior

Definition: Prompt Injection

Prompt injection is an attack in which malicious instructions embedded in content an AI system processes, such as an email, document, web page, or tool output, override the system’s original instructions and make it perform unintended actions.

Core characteristics of prompt injection

Prompt injection exploits a structural weakness in large language models: they process instructions and untrusted data through the same channel, with no reliable way to tell commands from content.

  • Exploits the shared channel between system instructions and untrusted input
  • Works through direct prompts or indirect payloads hidden in external content
  • Can hijack tool calls and data access, not just text output
  • Requires no access to model weights, only crafted input

Prompt Injection vs. AI Hallucination

AI hallucination is unintentional: the model fabricates information because it lacks grounding, not because someone told it to. Prompt injection is deliberate: an attacker crafts input specifically to redirect the model toward their own goal, such as exfiltrating data or triggering an unauthorized action. Hallucination is a quality problem solved with better grounding; injection is a security problem solved with input isolation and access controls. The two can compound, since a successful injection can also make the model fabricate a plausible justification for what it just did.

Importance of prompt injection in enterprise AI

As AI agents move from answering questions to reading inboxes and calling tools inside business systems, injection stops being a chatbot nuisance and becomes a route to real damage. It has held the #1 spot in the OWASP Top 10 for LLM Applications for two consecutive editions, and CrowdStrike’s 2026 Global Threat Report found manipulated prompts injected into legitimate GenAI tools at more than 90 organizations in 2025. For any AI agent with write access to enterprise systems, an unpatched injection path functions like an open API with no authentication.

Methods and procedures for prompt injection

Attackers and defenders both work across three technique families.

Direct injection

Direct injection targets the user-facing prompt itself, where an attacker types instructions designed to override the system prompt.

  • “Ignore previous instructions” style commands appended to a request
  • Role-play or persona framing used to bypass restrictions
  • Encoded payloads, such as base64 or unicode tricks, to slip past filters

Indirect injection

Indirect injection hides malicious instructions inside content an AI system processes on the user’s behalf: an email, a PDF, a website, or the output of another tool. Because the system treats retrieved content as trustworthy, the hidden instruction executes with the same authority as a legitimate request. This is the variant enterprises should worry about most, since it requires no interaction with the AI system’s interface at all.

Tool-chain and multi-agent injection

In systems built from several cooperating agents, one injected instruction can propagate through shared memory or handoff messages, turning a single compromised input into a chain of unauthorized actions. Systems that expose many callable functions through tool calling or the Model Context Protocol widen this surface further, since each connected tool becomes a potential target.

Important KPIs for prompt injection

Enterprises track injection exposure across detection, containment, and audit dimensions.

Detection and defense metrics

  • Injection detection rate on adversarial test suites: >95%
  • False positive rate on legitimate external content: <3%
  • Mean time to flag a suspected attempt: under 200 milliseconds
  • Share of AI-touching workflows covered by input-isolation controls: tracked per system

Containment metrics

Containment measures how much damage a successful injection causes before a control or a human-in-the-loop checkpoint intervenes. Gartner projects that 40% of agentic AI projects will be canceled by 2027, and uneven containment is a leading cause analysts cite for scrapped deployments.

Audit and accountability metrics

Every blocked or escalated attempt should generate a log entry tied to the input source, tool call, and approval decision involved, so AI governance teams can reconstruct what an agent was asked to do and why it did or did not comply.

Risk factors and controls for prompt injection

Left unaddressed, prompt injection risk compounds with every new data source or tool an agent gains access to.

Data exfiltration and unauthorized actions

A successful injection can redirect an agent to leak confidential data, send unauthorized emails, or execute transactions no one approved.

  • Customer or contract data forwarded to an attacker-controlled address
  • Fraudulent approvals or payments triggered through hijacked tool calls
  • System prompts or internal instructions extracted and exposed

Escalation through excessive agent autonomy

Agents with broad, standing permissions across CRM, ERP, and email amplify the blast radius of a single successful injection, since the compromised instruction inherits whatever access the agent already holds. Shadow AI deployments are especially exposed, because they typically run outside the guardrails IT applies to sanctioned systems.

Regulatory exposure under the EU AI Act

Article 15 of the EU AI Act requires high-risk AI systems to resist attempts by third parties to exploit vulnerabilities and alter their behavior, a requirement that directly covers prompt injection. Companies unable to demonstrate tested defenses risk gaps in their technical documentation during a conformity assessment, on top of the operational damage an attack causes.

Practical example

A 75-employee freight forwarding company in Bremen deployed an AI agent to read incoming customer emails and update shipment records automatically. During a pre-launch security review, the team tested it with a crafted email containing hidden instructions styled in white text, telling the agent to forward shipment manifests to an external address. The unpatched agent complied instantly, unable to distinguish the hidden command from a legitimate request. The company added input sanitization that strips hidden formatting and a rule that the agent may only act on requests matching a sender’s known shipment history, closing the gap before going live.

  • Content sanitization that strips hidden text and formatting tricks before an email reaches the model
  • Allow-list of actions the agent may take per sender or data source
  • Human confirmation required before any action touching an external recipient
  • Regular red-team testing with new injection payloads before each update

Current developments and effects

Prompt injection defenses are evolving as fast as the attacks themselves.

From filtering to structural isolation

Early defenses relied on keyword filters that attackers routinely bypassed. Current architectures increasingly separate trusted instructions from untrusted data at the system level, an approach that overlaps closely with how modern AI guardrails are built.

  • Dedicated instruction and data channels enforced outside the model
  • Sandboxed execution for actions triggered by untrusted content
  • Dual-model verification, where a second model checks the first model’s proposed action

Regulatory and standards attention

Germany’s BSI has published dedicated guidance on indirect prompt injection and Zero Trust design principles for LLM-based systems, recommending sandboxing, explicit confirmation before critical actions, and filtering of third-party content as baseline controls.

Agentic AI raises the stakes

As adoption shifts from chatbots to autonomous agents with standing system access, each newly connected tool multiplies the places an injected instruction can cause damage, making injection resistance a design requirement rather than a bolt-on feature.

Conclusion

Prompt injection is not a bug that gets patched away with a better model; it is a structural consequence of how large language models process instructions and data through the same channel. Enterprises that treat every external input as untrusted by default are best positioned to deploy AI agents safely at scale. As regulators formalize resilience requirements and attackers professionalize their techniques, injection defense will separate companies that can expand agent autonomy from those stuck re-approving every action manually. The organizations investing in layered defenses now will be the ones still trusting their AI agents next year.

Frequently Asked Questions

What is the difference between prompt injection and jailbreaking?

Jailbreaking targets the model’s safety training, trying to get it to produce content it was trained to refuse. Prompt injection targets the application layer, hijacking an AI system’s task-specific instructions or tool access regardless of whether the content itself is harmless. An attacker can use jailbreak-style phrasing within a broader injection attack, but the goals and defenses differ.

Can a company with 50-200 employees actually be targeted, or is this only a risk for large enterprises?

Yes. CrowdStrike documented manipulated prompts injected into legitimate GenAI tools at more than 90 organizations in 2025, and attackers do not need to know a target in advance, since indirect payloads can sit in any document or email an AI agent might eventually process. Mid-sized companies deploying agents with real system access carry the same exposure as larger ones, often with fewer dedicated security resources.

How does prompt injection relate to the EU AI Act and GDPR?

Article 15 of the EU AI Act requires high-risk AI systems to resist attempts by third parties to exploit vulnerabilities and alter their behavior, which directly covers prompt injection resilience. Under GDPR, an injection attack that exfiltrates personal data through a compromised agent can trigger breach notification obligations, so injection defenses double as a data protection control.

What does it cost to defend against prompt injection?

Cost depends on how many AI-touching workflows exist and how much system access each agent has, since defenses like input sanitization and tool-access limits are typically configured on top of existing agent infrastructure rather than requiring separate tooling. A focused rollout covering the highest-risk workflows fits within a normal AI agent implementation budget.

Do we need our own security team to defend against prompt injection?

Not necessarily from day one. Most mid-sized companies configure input isolation, tool-access limits, and human-confirmation checkpoints together with their implementation partner, with internal IT defining which actions require approval. As usage grows, ongoing testing typically becomes a shared responsibility between the company and its provider.

How does a custom AI employee’s approach to prompt injection differ from a generic chatbot?

Superkind scopes each AI employee’s tool access and approval checkpoints to the specific systems it connects to, so an injected instruction from an email or document cannot reach further than the permissions that particular workflow was explicitly given.

Building better software Contact us together