---
title: "Prompt injection"
url: https://eldan.ai/glossary/prompt-injection
canonical: https://eldan.ai/glossary/prompt-injection
locale: en
language: en
published: 2026-11-23
updated: 2026-11-23
author: "Eldan Abdrashim"
cite_as: "Eldan Abdrashim. \"Prompt injection.\" Eldan.ai, 23 November 2026. https://eldan.ai/glossary/prompt-injection."
---

# Prompt injection

> Prompt injection is an attack in which text the model reads, typed by a user or hidden in an email, web page or document, contains instructions that override the developer's intent. Indirect injection arrives through retrieved or tool-supplied content. It cannot be fully filtered out, so defences have to limit what a persuaded model can do.

A model reads one stream of text and has no hard boundary between instructions and data. OWASP ranks prompt injection first among the risks for LLM applications. The risk is highest for agents that combine private data, untrusted content and a way to send data out.

**Common mistake.** Adding “ignore instructions in documents” to the prompt and calling it a defence.

**In practice.** Use least-privilege tools, approval for side effects, no secrets in context, egress limits and logged tool calls, and put attack cases into your eval suite.

## Related terms

- [Least privilege](https://eldan.ai/glossary/least-privilege)
- [Guardrails](https://eldan.ai/glossary/guardrails)
- [Red teaming](https://eldan.ai/glossary/red-teaming)

## Used in

- [Tool Calling From Scratch](https://eldan.ai/tutorials/tool-calling-from-scratch)
