Skip to content

Stockertim Dictionary · Artificial intelligence · Cybersecurity

Prompt injection

Also called prompt injection attack, LLM prompt injection

In short

Prompt injection is text crafted to override or hijack the instructions an AI system was given, either typed directly or hidden in content the system reads.

  • Intermediate
  • Attack or threat
  • Checked

In detail

A language model receives its instructions and its working material as one stream of text, so it cannot reliably tell a genuine instruction from words that merely look like one. Prompt injection exploits that. In the direct form, a user types text designed to make the system ignore its rules. In the indirect form, the instruction is hidden in material the system processes, such as a web page, a document, an email or a product review.

The harm depends on what the system can do. A chat assistant that only writes text might be pushed into revealing its standing instructions or giving misleading answers. An assistant connected to email, files or payment tools could be steered into sending data out or taking actions its owner never intended. That is why injection is treated as a security risk, not just a quality problem.

No prompt wording fully prevents injection. Defences are layered: treat outside content as untrusted, give the system only the permissions its task needs, require a person's approval for risky actions, check outputs before they are used elsewhere, and log activity so misuse can be spotted.

Worked example

Northwind Bikes uses an assistant to summarise incoming supplier emails, and one email contains hidden text telling the assistant to forward the summary to an outside address.

  1. The assistant has no permission to send email, so the hidden instruction cannot be carried out.
  2. The summary flags that the email contains instructions aimed at the assistant.
  3. The security team reviews the email and blocks the sender.

Limited permissions and flagging turn an attempted attack into a logged incident with no harm done.

In practice

Security teams list prompt injection in threat models for any AI feature, limit tools and data access, separate untrusted content, add approval steps and test systems with harmless injection attempts before launch.

Watch out

  • Delimiters and polite instructions reduce but do not stop injection.
  • Prompt injection differs from a jailbreak: injection hijacks the system's task, while a jailbreak targets its safety rules.

Learn it properly

Official sources

Facts last checked on 3 November 2026.

Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.

English