Berk Bayri

Prompt injection

An attack in which someone slips instructions into the text an AI model reads, so the model follows the attacker instead of its owner. It matters most when the model can act: send email, call tools or touch data.

A language model cannot reliably tell the difference between instructions from its owner and instructions that arrive inside the material it is reading. Prompt injection exploits that. An attacker writes text that looks like a command, and the model treats it as one.

The direct form is a user typing "ignore your previous instructions" into a chat box. The more serious form is indirect: the instruction is hidden in a web page, an email, a PDF, a calendar invite or a retrieved document that the system pulls in while doing its job. Nobody in the conversation typed anything hostile. The OWASP Top 10 for LLM Applications 2025 lists prompt injection first and treats the two forms separately.

Why it is a design problem, not a filter problem

For a chatbot that only answers, a successful injection produces a bad answer. For an agent that can make tool calls, it can produce a bad action: forwarding a file, approving a refund, changing a record. No filter has been shown to catch every phrasing, so the dependable defense is to assume some injections will get through and limit what they can reach.

That means narrow permissions granted per task rather than broad standing access, human confirmation for irreversible steps, and keeping untrusted content away from the parts of the system that hold credentials. Task-scoped authority and a small blast radius do more here than a cleverer system prompt. The argument is developed in An AI agent should get authority per task, not permissions per role.