For the complete documentation index, see llms.txt. Every page on this site is also served as Markdown: append `.md` to any URL, or send `Accept: text/markdown`.
Skip to content

Glossary term

Prompt injection

Prompt injection is a vulnerability where text a language model reads, typed by a user or hidden in a web page, file or email, changes what the model does in ways its builders did not intend. OWASP ranks it first among risks for LLM applications. No complete fix is known, so defences limit damage: least privilege and human approval.

7 days free · card required

Whose pages AI answers citedn=100,380 citations
4,524 ChatGPT and Perplexity answers to 61 tracked questions, by owner of the cited domain · to
NameWhose pages AI answers cited
Third-party sites74.6%
Competitors' sites14.3%
AI vendors' own sites8.4%
Attensira's own domainsyou1.6%
Reference sites1.1%
Analyst agentAnalyst · reads this workspace's answersattensira.com workspace, read over the Attensira MCP ·
Karl-Gustav KallasmaaKarl-Gustav Kallasmaa, Founder & CEO

Last updated

Key facts

Prompt injection is the vulnerability in which input changes a language model's behaviour or output in ways the system's designer did not intend. It sits at the top of the OWASP Top 10 for Large Language Model Applications as LLM01, a fair reflection of how common it is and how hard it is to close.

The definition hides a detail that catches people out: the input does not have to be visible. OWASP notes that injections can affect the model even if they are imperceptible to humans, as long as the model parses the content. White text, an unusual character encoding and an instruction inside an image are all in scope.

What is the difference between direct and indirect prompt injection?

Direct injection is when a user's own prompt changes the model's behaviour unexpectedly, deliberately or by accident.

Indirect injection is when the model reads content from an outside source, a website, a file, an email, and instructions inside that content are treated as instructions. This is the variant that matters to anyone publishing on the web, because nothing enforces the boundary between your page and someone's prompt.

OWASP's scenarios make it concrete. A user asks a model to summarise a page containing hidden instructions, which make it insert an image linking to a URL that exfiltrates the conversation. An attacker edits a document in a repository a retrieval-augmented generation app uses, so a matching query returns the malicious text. And unintentionally: a company hides an instruction in a job description to spot machine-written applications, and an applicant who polishes a résumé with a model triggers it without knowing.

Why can prompt injection not simply be patched?

The reason is architectural. A model receives one stream of tokens. A system prompt, a retrieved document and a user message are separated by convention, not by a hard boundary, and the model's job is to follow instructions in text. OWASP puts it plainly: given the stochastic way models work, it is unclear whether fool-proof prevention exists.

It also rules out the fixes people try first. Retrieval and fine-tuning aim at relevance and accuracy, but OWASP reports they do not fully mitigate the problem. Multimodal systems widen it, since instructions can hide in images beside harmless text. And connectors widen it again: an MCP tool description from an untrusted server is text that reaches the model, as the Model Context Protocol specification itself warns.

What actually reduces the damage?

OWASP's mitigations read best as a hierarchy, because most limit the blast radius rather than prevent the injection:

  1. Constrain model behaviour with specific instructions about role, capabilities and limits.
  2. Define and validate output formats, checked by deterministic code.
  3. Filter input and output for sensitive categories.
  4. Enforce least privilege: privileged functions in code, minimum access for the model.
  5. Require human approval for high-risk actions.
  6. Segregate and label external content so untrusted text has less influence.
  7. Test adversarially, treating the model as an untrusted user.

Points 4 and 5 carry most of the weight. An agent that cannot spend money, send mail or write to a repository without a person approving is one where a successful injection is an embarrassment, not an incident.

What does a defended agent look like in practice?

Attensira's crew reads exactly the kind of text injection lives in: AI answers that quote pages nobody here controls, competitors' pages, and the web pages it researches. Its public documentation describes how that text is handled, and it maps onto OWASP's list:

  • Untrusted text is data. Observations derived from AI answers are, in the words of the documentation, "fenced off and scrubbed before it reaches a conversation, so a stray instruction hidden in a quoted page cannot steer what the agent does next" (OWASP 6).
  • Pages and drafts are judged, never obeyed. The decisions documentation states that a competitor's page "is read as text to judge, never as instructions", and that an instruction inside a draft, such as one copied from a page the agent read, "is judged as content and never followed" (OWASP 1 and 3).
  • A person approves what leaves. New workspaces start in Draft, where nothing is published, sent or written outside the workspace without approval, and anything stating a price, number or competitor name waits in every mode (OWASP 5).
  • Write access is narrow. On GitHub the crew opens pull requests on fresh branches, never pushes to your default branch and never touches CI configuration (OWASP 4).

None of that makes injection impossible; OWASP is right that no one can promise that. It makes a successful injection reach a person's Inbox instead of your site.

Where does an injected instruction end up in a defended agent?

In front of a person. When a page the crew read carries text that tries to steer it, the text is weighed as content, and anything the crew wants to send outside the workspace waits in the Inbox with its sources. This frame is an illustration of that flow, not a real item.

Inbox2 waiting for you
  • Outreach agentApproveSend a correction request to a directory listing

    Waits for your yes

    The listing states a price your brand profile contradicts. Draft attached, with the quote and the answers that cited the page.

  • Writer agentApproveRewrite the pricing passage the answers quote

    States a price: waits in every mode

    The new passage states your confirmed price in one self-contained sentence.

Example · Illustration of the approval flow

What does prompt injection mean for publishers?

There is a content side to this. If text in a page can steer a model, some people will plant text in pages, and those pages compete for the same answers as yours. Two things follow.

Treat any suggestion to hide instructions in your own markup as an attack you would be committing, not a tactic. It is the behaviour every mitigation above is built to detect, and being filtered out is the good outcome. And when an assistant says something wrong about your brand, remember it may have come through a retrieved page rather than the model's memory. That is a different failure from a hallucination, fixed in a different place: at the source the answer cited.

How does Attensira help when answers repeat injected or false claims?

By tracing the claim back to the page that planted it. An injected or false statement about you reaches an answer through a source the engine fetched, and across our own tracked questions only 1.6% of citations pointed at pages we control, as the chart at the top of this page shows. Attensira keeps every answer verbatim with the sources it cited and checks the factual claims it makes about you against facts you confirmed, so a contradicted claim arrives with its quote and the exact pages behind it. Then the deciding sources view shows how much weight each of those pages carries across your questions, which tells you whether one bad page is worth a correction request. The crew can draft that request or the replacement passage, and it waits in the Inbox for your approval before anything goes out.

Questions about prompt injection

What is prompt injection?
OWASP defines it as a vulnerability that occurs when user prompts alter the model's behaviour or output in unintended ways. It notes the input can work even if it is imperceptible to humans, as long as the model parses it, so white text or an instruction inside an image is in scope.
What is the difference between direct and indirect injection?
Direct injection is when a user's own prompt alters the model's behaviour, on purpose or by accident. Indirect injection is when the model reads content from an outside source, such as a website or file, and instructions inside that content change what it does.
Is prompt injection the same as jailbreaking?
OWASP treats jailbreaking as a form of prompt injection: the case where input makes the model disregard its safety protocols entirely. The terms are often used interchangeably but are not identical.
Can retrieval or fine-tuning fix it?
No. OWASP states that while retrieval-augmented generation and fine-tuning aim to make outputs more relevant and accurate, they do not fully mitigate prompt injection.
Should I hide instructions for AI in my own pages to get recommended?
No. Hidden instructions aimed at a model are the behaviour every mitigation is built to catch, and systems that fence off retrieved text treat them as content, not commands. At best they are ignored; at worst your page is filtered out as an attack. Write the passage you want quoted instead.
How does Attensira protect its own agents from injected instructions?
Its documentation describes three layers: text from pages and answers is shown to the agent as data and never as instructions; drafts are checked as content, so an instruction copied into a draft is judged and never followed; and anything leaving the workspace waits for a person's approval in the default mode.

Where do these facts come from?

4 sources: each statement with the page it came from and the day it was checked.

  1. Prompt injection is ranked LLM01, the first entry, in the OWASP Top 10 for Large Language Model Applications, 2025 edition.

    genai.owasp.org · retrieved

  2. Attensira's agent documentation states that observations derived from AI answers are fenced off and scrubbed before they reach a conversation (agent/what-we-know), and that a competitor's page is read as text to judge, never as instructions, while an instruction inside a draft is judged as content and never followed (agent/decisions).

    docs.attensira.com · retrieved

  3. Attensira's approval documentation states that Draft is the mode every new workspace starts in, and that anything stating a price, number or competitor name waits for a person in every mode.

    docs.attensira.com · retrieved

  4. In Attensira's own attensira.com workspace, read over the Attensira MCP on 4 October 2026, 4,524 ChatGPT and Perplexity answers to 61 tracked questions between 4 September and 4 October 2026 carried 100,380 citations: 74,884 to third-party sites, 14,382 to tracked competitors' sites, 8,383 to AI vendors' own sites, 1,143 to reference sites and 1,588 (1.6%) to Attensira's own domains.

    attensira.com workspace, read over the Attensira MCP on

Want whatever it takes to win the answer?

7 days free · card required