JOURNAL / AI SECURITY

What is prompt injection?
When data tries to give orders.

AI systems read messages, web pages, files, and tool results. Prompt injection is what can happen when instructions hidden in that material redirect the model away from the user’s task.

A person reviews printed pages beside an open laptop.TRUST / CONTEXT / SYMPLOKA
NOT EVERY INSTRUCTION IS THE USER’S

A system can read words a person never intended it to follow.

A document can be useful evidence and still be untrusted input. The application has to preserve that distinction when a model reads, searches, and acts.

01 / THE BASIC IDEA

Prompt injection is an attempt to change what the model does.

It happens when text or other content presented to a model tries to override the task or steer the output in an unintended way. The content may be deliberate, accidental, visible, or hidden in material the application reads.

It is not the same as an ordinary wrong answer. The important security question is whether an instruction from an untrusted source can cross into the model’s behavior or influence tools and data the application connects to it.

02 / TWO ROUTES IN

The instruction can come from the user—or from something the system reads.

Direct injectionA user message attempts to replace the assistant’s assigned task or constraints. It may be malicious, playful, or simply unexpected input.
Indirect injectionA web page, email, document, code comment, search result, or tool response includes instructions that the model may treat as part of its task.

This matters most when an application gathers information from outside the conversation. The person may ask for a summary, while a page or file contains separate directions intended for the model. The model sees both in context; the application must decide which source has authority.

Images and other media add another path: text may reach a multimodal model through visual recognition even if a person does not notice it. The OWASP GenAI Security Project includes this in its current prompt-injection guidance.

03 / WHY IT IS A SYSTEM PROBLEM

Adding more text to the prompt does not create an access boundary.

Language models process instructions and supplied content together. Labels, delimiters, and clear task prompts can help signal what is trusted, but they do not enforce permissions or guarantee that every injected instruction will be ignored. Adding retrieval or fine-tuning does not remove the risk by itself.

The impact depends on the surrounding application. A chat-only system may produce a misleading response. An agent with access to private records, browsers, file systems, or messaging tools can have a larger blast radius if it acts on an untrusted direction. Model output is a request to the application; it is not authorization.

Keep authority in code and access controls. Use the model to interpret a task; do not let a sentence in a document grant a new capability.

04 / WHAT THE EVIDENCE SAYS

Hidden instructions are measurable. A single rate is not a universal risk score.

A 2026 arXiv preprint screened 1.2 billion URLs across 24.8 million hosts and reported 15,300 validated prompt-injection instances on about 11,700 pages. In its identified set, the authors found many instructions in non-rendered parts of pages such as headers, comments, or metadata.

The same paper’s controlled experiments used webpage summarization tasks across 13 models and four input representations. Its observed success rates changed with the representation supplied to the model. The authors describe their crawl as a lower-bound estimate and note that detection can miss obfuscated or non-English cases; these measurements should not be read as a general probability that any agent will be compromised.

The practical point is narrower and useful: external content may contain machine-directed instructions that are not obvious in a normal visual review. Test how the complete application handles such content and keep the consequences constrained.

05 / LIMIT THE CONSEQUENCES

Design for a mistaken interpretation, not a perfect refusal.

Mark outside content as untrustedPreserve source and role information when adding pages, files, and tool results to a model’s context.
Give tools the minimum accessScope data to the user and task. Keep credentials and authorization checks in the application rather than in model-readable text.
Gate consequential actionsValidate every tool request against server-side rules. Require a person to review actions with meaningful consequences.
Check the whole workflowTest direct and indirect inputs, including multimodal sources. Record attempted tool calls and blocked actions, not only the final answer.

OWASP recommends layered mitigation—including least privilege, human approval for high-risk operations, clear treatment of external content, and adversarial testing. It also notes that there is no foolproof prompt-only prevention method. Filters can help, but they should not be the only barrier between an injected instruction and a protected action.

SECURITY GUIDANCE & RESEARCHOWASP GenAI Security Project, LLM01:2025 Prompt Injection ↗Khodayari et al., Indirect Prompt Injection in the Wild: An Empirical Study of Prevalence, Techniques, and Objectives (2026 preprint) ↗Greshake et al., Not What You’ve Signed Up For: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection ↗OpenAI, Designing AI Agents to Resist Prompt Injection ↗