Back to blog
AI SECURITY · 5 MIN READ

Prompt injection is an application security problem

Why instructions hidden in documents, webpages and tool outputs should be treated as untrusted input.

Prompt injection is often described as a clever prompt that tricks a model. In a real application, it is better understood as a security problem involving untrusted data, permissions and system boundaries.

Separate instructions from data

An agent may read emails, webpages, spreadsheets or knowledge-base documents. Those sources can contain text that looks like instructions. The application must not treat retrieved content as trusted authority simply because the model can read it.

Enforce security outside the prompt

Use least-privilege tool access, server-side authorization, input and output validation, and explicit approval for consequential actions. Do not rely on a system prompt as the only control preventing an agent from changing data or triggering an action.

Test the whole workflow

Create adversarial test cases for indirect prompt injection, data exfiltration attempts, tool misuse and privilege escalation. Test the model, orchestration layer, connectors and downstream systems together. Security controls should remain effective even when the model produces an unsafe suggestion.

Enjoyed this article?Let's continue the conversation