首页 AI Indirect Prompt Injection (OWASP LLM01): Email, RAG and MCP Agent Risks and Defenses (2026)

Indirect Prompt Injection (OWASP LLM01): Email, RAG and MCP Agent Risks and Defenses (2026)

Indirect prompt injection explained for email assistants, RAG and MCP agents: where untrusted content enters, a permission matrix and per-channel defenses (OWASP LLM01).

Last updated: 3 November 2026

Short answer: indirect prompt injection happens when an LLM reads external content (a web page, an email, a file, a retrieved document or a tool result) and instructions hidden in that content change what the model does. OWASP lists it under LLM01 alongside direct injection. The defense is mostly architectural: decide what the model is allowed to do after it has read untrusted content. This article walks through email, RAG and MCP/agent setups with a permission matrix. No attack strings.

Indirect prompt injection in email, RAG and MCP agents

1. What makes it “indirect”

OWASP: indirect prompt injections occur when an LLM accepts input from external sources such as websites or files, and the external content, when interpreted by the model, alters its behaviour in unintended ways. Like direct injection it can be intentional or unintentional. The user may never see the injected text, which is why classic “just train users” advice does not help. OWASP’s own scenario: a user asks an LLM to summarise a web page containing hidden instructions, leading to exfiltration of the private conversation.

2. Where untrusted content enters

Channel Why it is risky First defensive move
Email assistant Anyone on the internet can send your assistant text Treat all inbound mail as data; no auto-actions on sender claims; approval for replies and forwards
RAG knowledge base Anyone who can edit or upload a source can influence answers (OWASP “intentional model influence”) Access control and edit review on sources; show citations; separate high-trust and low-trust corpora
Web browsing / search tools Pages are written by strangers Read-only browsing session; no credentials or private context in the same session
Uploaded files and images Instructions can be embedded where humans do not look; OWASP flags multimodal risk Sanitise and parse to plain text; limit what the model can do after reading
MCP servers and tool results Tool output and tool descriptions enter the prompt as text Allow-list servers, least-privilege scopes, review tool descriptions (see the Chinese MCP least-privilege guide)
Agent-to-agent messages One compromised agent can steer another Authenticate and scope inter-agent calls; log hand-offs

3. A simple blast-radius test

For each session, ask three questions. (1) Can the model see anything private? (2) Does it read anything an outsider can influence? (3) Can it send data out or take an action (a link, an email, an API call)? This is our own working framing, not an OWASP term. If all three are yes in the same session, an injection can turn into a leak, so remove at least one: split the work across sessions, drop the outbound capability, or require human approval for it.

Permission matrix for agents that read untrusted content

4. Permission matrix

Session reads untrusted content? Holds private data? Can act or send? Recommended posture
Yes No No Low risk: summaries and classification only
Yes Yes No Medium: block outbound rendering of links and images; log
Yes No Yes Medium: scope actions tightly; approval for anything irreversible
Yes Yes Yes High: redesign. Split sessions or require human approval
No Yes Yes Standard application controls plus direct-injection testing

5. Defenses by layer

  • Segregate and label external content so it is clearly marked as data (OWASP mitigation).
  • Least privilege: keep credentials in code; the model gets only the functions it needs, with minimal scopes.
  • Human approval for high-risk and outbound actions.
  • Validate outputs in code: schemas, allow-listed domains and actions, no rendering of arbitrary remote content.
  • Filter input and output, and evaluate answers for groundedness against the retrieved context (the OWASP RAG Triad).
  • Test: include indirect scenarios in your suite and treat the model as an untrusted user. See our red-teaming guide and the Chinese test-case guide.
  • Monitor: alert on unexpected tool calls, new outbound domains and sudden changes in answer sources.

Self-hosted assistants with chat-channel and tool access (for example the kind of setup described in our OpenClaw setup guide) face exactly this pattern: the more channels and tools you connect, the more places untrusted text can enter. Apply the matrix before you add each integration. For Chinese-language depth see agent prompt-injection defense and the OWASP LLM Top 10 checklist.

Frequently asked questions

What is the difference between direct and indirect prompt injection?

Direct injection comes from the user’s own input; indirect injection comes from external content the model reads, such as a web page, file or email.

Can I block it with a filter on the email body?

A filter can catch some cases but, as OWASP and the UK NCSC both indicate, no fool-proof prevention is known. Combine filtering with least privilege and approval.

Is RAG vulnerable?

OWASP says RAG does not fully mitigate prompt injection, and a poisoned or edited document is one of its example scenarios.

Are MCP servers a special risk?

They add more text sources and more powerful tools. Review each server’s permissions and keep high-impact tools behind approval.

Where do I start?

Draw a data-flow diagram of what each agent reads and can do, then apply the matrix. See also our prompt-injection explainer.

Scope note: this is a defensive and educational article for AI product, security and compliance teams. It contains no working jailbreak prompts, no bypass steps and no lists of uncensored tools, and PandaWM does not provide them. It is general information, not legal advice; platform and legal rules change, so check the current official pages.

Taking an AI product global? Talk to PandaWM

PandaWM helps overseas-facing businesses get found in AI search and traditional search (GEO and SEO, see our GEO service page) and run overseas ads through the platforms’ official channels. If you are preparing an AI product for global launch and want a second pair of eyes on how it is described, listed and advertised, contact us via pandawm.com or Telegram t.me/PANDA0134 with your market, product type and goals. We do not provide jailbreak, bypass or uncensored-model services.

Official and primary sources

Pages opened on 3 November 2026. Policies, rankings and numbers change; always check the current official page.

Cite this page: PandaWM (熊猫出海) pandawm.com, “Indirect Prompt Injection (OWASP LLM01): Email, RAG and MCP Agent Risks and Defenses (2026)”, https://www.pandawm.com/blog/indirect-prompt-injection-owasp-llm01-email-rag-mcp-defense-en.html

本文来自网络,不代表熊猫出海立场。转载请注明出处: https://www.pandawm.com/blog/indirect-prompt-injection-owasp-llm01-email-rag-mcp-defense-en.html
上一篇
下一篇

作者: 熊猫出海编辑团队

熊猫出海(PandaWM)编辑团队,来自香港出海服务商熊猫出海,专注 Facebook、TikTok、Google 等海外广告开户与代投,以及 GEO/AI 搜索优化、多语言独立站建设。文章依据 Meta、TikTok、Google 等平台官方政策与帮助中心资料整理,并标注最后更新日期。

为您推荐

发表回复

联系我们

联系我们

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部