Cybersecurity

What is Prompt Injection?

Quick answer

An attack that hides instructions in text an AI system reads, tricking it into ignoring its original rules or taking unintended actions.

Prompt Injection, explained

Language models treat instructions and data as the same kind of input: text. Prompt injection exploits this. An attacker places instructions in a web page, email, document, or form field, hoping an AI system will read them and follow them as if they came from the user or developer.

A common example is an email assistant that summarizes incoming messages. A malicious email might contain hidden text telling the assistant to forward the user's recent invoices to an outside address. If the assistant can send email and has no safeguards, it may comply. Prompt injection is especially serious for AI agents that can browse, send messages, or change records. Defenses include limiting tool permissions, separating trusted instructions from untrusted content, requiring confirmation for sensitive actions, and monitoring for unusual behavior.

Related terms

Guides that mention Prompt Injection