maxdraco

Prompt injection

Hiding instructions in text an AI model reads, so that it follows them instead of its user.

Concept Programming and AI Security operations

A large language model can’t reliably tell its user’s instructions apart from instructions written inside the text it is reading, such as a web page, an email or a document. Prompt injection exploits that: an attacker plants text like “ignore your previous instructions and…” where the model will read it. It matters most when the model can take actions, such as sending messages or calling an API, because the planted text can then make it do things its user never asked for.

See also

  • Large language model (LLM) and chatbots An AI model trained on huge amounts of text to predict and write language; the kind of AI behind chatbots.
  • Sandbox (sandbox escape) A restricted environment that limits what a program can touch; a sandbox escape is a way out of it.
  • Least privilege The rule that every person or program should get only the access it needs for its job, and no more.
  • AI Artificial intelligence: software that performs tasks usually thought to need human judgement.
  • API A defined way for one program to ask another for data or actions.
  • Endpoint (route) One specific address on a web service that a program can call to do one job.
  • Environment variable A named setting a running program inherits from whatever started it.
  • Exit code The number a program hands back when it finishes: zero for success, anything else for failure.

Sources

  1. NIST CSRC Glossary: prompt injectionNISTofficial healthy, checked 2026-11-15 archived copy
  2. LLM01: Prompt InjectionOWASP not checked: the site asks automated checkers not to archived copy
  3. Prompt injectionWikipedia healthy, checked 2026-11-15 archived copy

In security catalogues