← All Articles
Sign in
Security Blog

Prompt Injection in AI Features: What OWASP, Anthropic and OpenAI Say to Do

By AI SaaS Radar Team · Nov 2026 · 5 min read

Prompt injection happens when input changes an AI model's behavior in a way you did not intend, and you reduce the damage by limiting what the model can do, separating untrusted content from your instructions and requiring human approval for risky actions. No source claims it can be fully prevented. OWASP says it is unclear whether foolproof prevention exists, and OpenAI says structured outputs and isolation greatly reduce the risk without fully removing it. This guide summarizes the three sources as read on 10 November 2026.

Key facts

Two threat models

Anthropic's guide splits the problem in two. In jailbreaks and direct prompt injection, the user of your application is the adversary and crafts inputs to bypass your guardrails. In indirect prompt injection, the user is trusted but the model processes third-party content such as web pages, emails, documents or tool results that contain adversarial instructions. OWASP draws the same line. The second case is the harder one for most products, because the attacker never talks to your application. They only need to put text where your model will read it.

OWASP also notes the possible impacts: disclosure of sensitive data, exposure of system prompts or infrastructure details, biased or incorrect output, unauthorized use of model functions, commands executed in connected systems and manipulated decisions. Those impacts grow with the tools and data your feature can reach.

Defenses against direct injection

Defenses against indirect injection

Limit what a successful attack can do

OWASP and Anthropic both point to least privilege. Anthropic says to avoid giving the model secrets it does not need, run tools in sandboxed environments and scope permissions as narrowly as possible. OWASP lists least privilege and human approval for high-risk actions. OpenAI says to keep tool approvals on for MCP tools so a person can review and confirm each operation, and describes guardrails as an effective first wave of protection that is not foolproof. If a feature can send email, spend money or delete data, put a human confirmation between the model and that action.

Test it the way an attacker would

OWASP lists adversarial testing and Anthropic recommends red-teaming your own agent before deployment, using documents, emails and tool outputs that deliberately contain injection attempts. OpenAI recommends evals and trace grading to measure behavior. Add monitoring: Anthropic advises analyzing outputs regularly for signs of a successful injection and using what you find to refine prompts and filters.

What to do

For how costly these incidents are, see our coverage of IBM's breach cost figures for prompt injection and of the form-based injection found in Agentforce and Copilot. Compare security tools in the AI tool directory.

Questions people ask

What is indirect prompt injection?

It is when the model reads external content, such as a web page or file, that contains instructions that change its behavior.

Can prompt injection be fully prevented?

OWASP says it is unclear whether foolproof prevention exists, and OpenAI says structured outputs and isolation do not fully remove the risk. The practical goal is to limit the impact.

What is the single most useful control?

OWASP and Anthropic both name least privilege. A model that cannot reach sensitive data or take risky actions has less to lose when it is tricked.

Sources

Stay ahead of the AI SaaS market

Sourced, dated analysis on security, funding, and benchmarks. Straight to your inbox.

No spam. Unsubscribe anytime.