Skip to main content
AI risk

Risk type: Prompt Injection

Prompt injection

Prompt injection makes an AI follow instructions it should ignore. Direct attacks use the prompt. Indirect attacks hide in pages, files, or email.

OWASP ranks it first among LLM risks, as LLM01. OWASP says fool-proof prevention remains unclear. The UK NCSC says it may never be totally mitigated. Agents raise the stakes: they act on what they read. Limit agent permissions. Require approval before risky actions.

Last updated

2026-10-30

Direct and indirect prompt injection compared

Types and controls from OWASP and NIST guidance. Sources checked October 30, 2026.
Attack typeWhere the instruction hidesExampleFirst control
Direct injectionThe user’s own prompt.A user tells a support bot to ignore its rules.Constrain model behavior and validate outputs.
Indirect injectionPages, files, email, or tool output. A third party plants it.A summarized page hides an instruction to leak the chat.Segregate and label external content.
Multimodal injectionImages or audio processed with text.An image carries instructions the user cannot see.Filter inputs and test multimodal paths.
Agent goal hijack (OWASP ASI01)Any content an agent acts on.Hidden prompts turned copilots into exfiltration tools, as in EchoLeak.Least privilege and approval for high-risk actions.

Types and controls from OWASP and NIST guidance. Sources checked October 30, 2026.

Affected tools

  • AI chat tools
  • AI copilots
  • Browser agents
  • Retrieval-augmented assistants
  • MCP-connected agents

How it usually happens in the browser

  • Someone pastes an untrusted page into an AI tool.
  • The content hides an instruction such as “ignore previous instructions.”
  • An agent with browser, email, or file access obeys it.
  • The model leaks data or takes an unsafe action.
  • Attackers iterate cheaply, and detection stays imperfect.

What traditional defenses miss

  • Input validation was built for code, not natural language.
  • LLMs make no distinction between data and instructions.
  • People assume “summarize this page” is a safe request.
  • Few tools trace page to prompt to output to action.
  • Tool access turns a bad answer into a real action.

Mitigation checklist

  • Constrain model behavior with clear, narrow instructions.
  • Give agents only the tools and access each task needs.
  • Label external content as data, not instructions.
  • Require human approval before high-risk actions.
  • Filter inputs and outputs, and validate output formats.
  • Red-team your most used AI workflows on a schedule.

Where browser isolation fits

  • Shield runs the page in a browser that is not on your computer, destroyed when you close the tab.
  • Shield moves page execution off your device while you research.
  • Isolation changes where a page runs. It does not change what a model obeys.
  • Agent builders reach the same routing and isolation through a ready skill.
  • Your agent stack still owns its permissions and logs.

What to do next

No single prompt fixes prompt injection. Treat external content as untrusted. Give agents narrow tools and permissions. Put a person in front of risky actions. Then test the workflow again.

Limits

  • No control list makes an agent immune to injection.
  • Vendor defenses are each vendor’s own description, not an audit.
  • Your workflow’s risk depends on its tools and data.
  • We reviewed standards and research and ran no tests.

FAQs.

Is prompt injection the same as jailbreaking?
The two terms overlap. OWASP treats jailbreaking as a form of prompt injection. Jailbreaks target a model’s safety rules. Other injections target the app or agent around the model.
Can prompt injection be fully prevented?
No reliable fix is known. OWASP says fool-proof prevention remains unclear. The UK NCSC says it may never be totally mitigated. Limit the impact with least privilege and approvals.
What is an example of indirect prompt injection?
A user asks a model to summarize a web page. The page hides instructions in its text. The model inserts an image link that leaks the chat. OWASP uses this scenario in LLM01:2025.
Does prompt injection affect agentic browsers?
Yes, and vendors say so. Google calls indirect prompt injection the primary new threat. Google says it faces all agentic browsers. Anthropic calls Claude in Chrome “still risky.” Both add classifiers and confirmation steps.
Which OWASP list covers AI agents?
The OWASP Top 10 for Agentic Applications. OWASP published it on December 9, 2025. Its first entry, ASI01, is agent goal hijack.
What is the fastest mitigation?
Cut agent permissions to what each task needs. Require approval for high-impact actions. Treat web content as untrusted input.

References

  1. 01
    OWASP LLM01:2025 Prompt InjectionOWASP Gen AI Security Project
  2. 02
  3. 03
    OWASP LLM06:2025 Excessive AgencyOWASP Gen AI Security Project
  4. 04
  5. 05
  6. 06
  7. 07

Keep exploring

Try it on the next page you do not trust

Legba is a Chrome extension with two modes. Ghost gives you a private browser route. Shield opens a page in an isolated browser off your device.

Free for 30 days. No card required.

Ghost. A private route for your browser. Shield. An isolated browser, off your device. Choose the mode. Close when finished.