Skip to content
be-human.ai
← Back to the journal

Human oversight

Prompt Injection Through Email: Defenses for Superintelligent Agents

Hostile instructions hidden in inbound email can steer an AI agent into unwanted actions. Learn how filters, tool limits and approval gates contain them.

Be Human typographic cover with the title: Prompt Injection Through Email: Defenses for Superintelligent Agents
Conceptual illustration created with AI · Be Human

Prompt injection through email is an attack in which a message contains text written to look like instructions, so that an AI agent reading the inbox follows the sender's wishes instead of its owner's. The agent cannot reliably separate the words it is supposed to summarize from the words it is supposed to obey, so defense rests on limiting what the agent can do rather than on spotting bad sentences. Filters reduce the volume of hostile content, but tool permissions, approval gates and logs decide how much damage a successful injection can cause.

Key takeaways

  • Email is untrusted input. Any sender, including someone who spoofs a supplier or uses a compromised account, can place text in front of your agent.
  • Filters reduce noise but cannot be the only control, because the same instruction can be phrased in endless ways and in more than one language.
  • Tool limits set the blast radius. An agent that cannot send to outside addresses or change payment details cannot be talked into doing so.
  • Actions that move money, share data or change records need a human decision made through a channel the attacker cannot write to.
  • Test with hostile sample emails before any agent reads a live inbox, and keep logs that show what the agent read and what it attempted.

How a hostile email reaches an agent

Most people picture prompt injection as a user typing clever commands into a chat window. Email works differently. The attacker never talks to your agent. They write a message, and the agent reads it later as part of a routine job such as triage, summarizing or drafting replies. Because the content arrives as ordinary data, the agent has to treat it as material to work with, not as a source of authority. That distinction is easy to state and hard to enforce, because a language model does not keep data and commands in separate channels the way a well-built database keeps parameters apart from queries.

The OWASP Top 10 for LLM Applications lists prompt injection as a leading risk category, and OWASP's prompt injection guidance describes direct attacks and indirect ones that arrive through external content a model processes. Email is a textbook indirect channel. Anyone who can reach your inbox can place text in front of the agent, and the agent may read that text with the same attention it gives to a message from your own manager.

Where the hostile text hides

Review every place an agent reads, not only the body you see on screen. Common hiding spots include:

  • The visible body, where a request can be dressed up as a policy update, a reminder or a message from leadership.
  • Styled HTML text that is hidden or colored to match the background, invisible to people but present in the content the agent receives.
  • Signatures, footers and disclaimers, which people rarely read closely and which agents often process in full.
  • Quoted history from earlier replies, which can carry instructions planted in an older message that now sits deep in a thread.
  • Attachments converted to text, including PDFs, spreadsheets and document comments.
  • Calendar invitation descriptions, link text and image alt text.

Each of these is a place where the same mechanism applies. If the agent can read it, the text can try to instruct it. An inventory of these surfaces belongs in the agent's design document before any connection to a live mailbox, because you cannot contain a channel you have not listed.

Why filters alone do not contain the risk

Keyword filters catch obvious phrases such as 'ignore previous instructions', but attackers paraphrase, split an instruction across several messages, write in Portuguese or another language, or hide it in encoded text. A classifier that flags suspicious messages can lower the number of attempts that reach the agent, and that is worth doing. It will still miss some attempts, and a single miss should not be able to move money or send company data outside the business.

A filter can lower how often hostile text reaches the agent. It cannot decide which instructions the agent should ignore.

Treat filtering as one layer among several. Strip hidden styling where your tools allow it, normalize text before it enters the model, mark external content as untrusted within the prompt structure, and log every flag. The OWASP prompt injection prevention cheat sheet describes these techniques in more depth. None of them should be the reason you grant the agent additional permissions, because a filter that works most of the time is a control you can monitor, not one you can rely on.

Limit what the agent can touch

The most effective containment is structural. Decide what the agent is able to do before deciding what it reads, and assume that anything it reads may be hostile. OWASP's authorization guidance points the same way: grant the minimum rights a task requires, enforce them outside the model, and never depend on the model to refuse an action it was not permitted to take in the first place. In practice, this usually looks like the following:

  • Give the read function its own scope, with no send, delete or export rights attached to it.
  • Keep sending in a separate tool that accepts only recipients on an approved list or on your own company domain.
  • Remove from the email agent entirely any capability to change payment details, vendor bank accounts, contract records or user permissions.
  • Block outbound links and attachment uploads to domains outside the approved list unless a person reviews them first.
  • Make the tool itself validate arguments, so a request to send to a new address fails in code whatever the model asked for.
  • Use scoped, separately issued credentials for each connector, and revoke them when a role changes.

Scoped OAuth access is a natural fit for this, since each token can be limited to the permissions one integration needs. When you connect tools through the Model Context Protocol, list each tool explicitly so you know exactly which capabilities the agent holds. A short inventory of tools and scopes, reviewed when anything changes, is more useful than a long policy document nobody opens.

Set approval boundaries before the first run

Approval is where a person decides, and it should sit outside the email thread. An approval request sent through the same mailbox the attacker wrote to is not a real approval. Use a separate channel, show the reviewer the exact proposed action and the source text that prompted it, and record who approved what and when. The following decision guide is a starting point to adapt to your own business:

  • Summarize, classify or label an inbound message: no approval needed, but log the action.
  • Save a draft reply for a person to review: no approval needed, and the draft stays unsent until a staff member sends it.
  • Reply to a known contact with no attachment and no amounts or payment dates: a sampled human check may be enough at first, with autonomy widened only after the evidence supports it.
  • Send any reply that contains figures, payment dates or attachments: named human approval before sending.
  • Create or change a payment detail, vendor bank account or contract term: two-person approval through the finance or core business system, never through the inbox.
  • Share files, contact data or agent memory outside the company: stop and escalate. Do not allow it without a written policy.

Where the line falls depends on your business and risk tolerance. Where should your AI agent stop and ask? walks through the reasoning in more detail.

Illustrative scenario (not a real case): an operations assistant reads a shared procurement inbox, summarizes supplier messages and drafts replies for staff. A message arrives from a known supplier domain with a signature block in very small, light gray text. That text says the supplier's bank details have changed and asks the assistant to send the latest invoice and an updated payment form to a new address. The model reads it as part of the thread.

The design holds because the assistant's email tool cannot send to unapproved recipients. The draft goes to a staff queue with a flag, the new address is not on the approved list, and any change to bank details requires two named approvers working in the finance system. The attempt is logged with the message identifier and the text that triggered it. The finance team verifies the change by calling the number already on file, and the security review adds the signature pattern to the test set. Nothing irreversible happened, not because the model resisted, but because the attacker's goal was out of reach.

How to test before a live inbox, and how Be Human approaches it

Build a set of hostile sample emails before connecting any live mailbox. Cover visible instructions, hidden text, signatures, quoted history, attachments, and versions written in English and in Portuguese, since filters tuned on one language often miss the other. Run the set in a sandbox where the agent has no real sending rights, and record what the agent tried to do, not only what it said. Keep the routine simple:

  • Store the hostile set in version control, with the expected behavior written next to each sample.
  • Check tool call logs, not only final answers, because a polite reply can hide an attempted export.
  • Re-run the full set after every change to prompts, models, connectors or permissions.
  • Review blocked attempts on a fixed schedule, so repeated patterns reach the people who can fix the design. How to review what your agent tried to do describes a routine you can run without specialist tools.
  • Define a pause procedure in advance. An AI agent kill switch should halt actions while preserving logs and queued work, so an incident can be investigated instead of erased.

Be Human designs and operates this kind of setup as managed infrastructure. A first engagement defines one useful role, the memory and tools it needs, its approval boundaries and an observable success criterion. Ongoing operations can include monitoring of tool calls, recurring evaluations that include hostile samples, permission reviews when people or connectors change, and incident response. The aim is that the agent's capabilities stay inside boundaries your team can read, test and change.

If you are not sure which inbox task deserves an agent first, the free Be Human AI diagnostic can help you find the first task worth handing to an agent.

Frequently asked questions

Can one email really take control of an AI agent? It is rarely a full takeover, but it can try to steer the agent's next step. If the agent has broad tools and no approval gate, a successful instruction could lead to a message being sent, a file being shared or a record being changed. The practical question is what the agent is able to do with the text it reads, and that is a design decision you control.

Is a spam filter enough to protect an inbox agent? No. Spam filters are built to catch unwanted bulk mail and phishing signals, while prompt injection often arrives inside messages that look completely normal. Filtering can reduce volume, but containment comes from tool scopes, approval gates and logging that show what the agent attempted.

Do Portuguese-language emails need different defenses? The mechanism is the same, but your test set must include Portuguese and mixed-language samples, because patterns tuned on English can miss paraphrases in other languages. Make sure reviewer instructions and approval requests are clear in both languages as well. Internal policy should also say which language the agent uses when it escalates to a person.

Who should own this risk inside the company? Usually an operations leader owns the agent's role and approval rules, IT or security owns connector permissions and logs, and the business owner or finance lead owns any action that moves money. A short written record of these owners prevents the common gap in which each team assumes another is checking. Be Human can help define that split as part of managed operations.

Your next step

See where an AI agent fits in your company first.

Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.

Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.

Less busywork. More room for you.

Bring us the work you wish you had time for.

Book a call to try a personalized AI agent free for 7 days ↗Or take the free AI diagnostic →