|6 min read|BreakMyAgent Team

AI Agent Email Security Tests Before Launch

How to test agents that read and draft email for prompt injection, data leakage, unsafe sends, and source-confusion failures.

AI email agent securityemail prompt injectionagent security testing

AI Agent Email Security Tests Before Launch

AI agent email security testing checks whether messages can trick the agent into leaking context, sending unauthorized replies, skipping approval, or treating sender text as trusted policy.

Quick Answer

  1. Seed emails with hostile instructions.
  2. Test reply drafts and external sends separately.
  3. Verify the agent preserves sender, thread, and attachment context.
  4. Require human approval before sending.
  5. Save failures as regression cases.

Email is the perfect prompt-injection surface

Email is untrusted, personal, and full of instructions. An attacker can write "ignore prior instructions" in plain text, hide text in an attachment, or quote fake policy language from a known company.

The agent should summarize or draft around that content without obeying it.

Drafting and sending are different permissions

An agent that drafts a reply is doing internal work. An agent that sends a reply creates an external side effect under someone's identity.

Treat those as separate capabilities, with separate tests and approval gates.

Attachments need special handling

PDFs, docs, images, and forwarded threads can carry instructions and stale context. The agent should identify the source and avoid promoting attachment content into policy.

Where BreakMyAgent fits

BreakMyAgent helps teams maintain a library of email-agent attacks and rerun them whenever the inbox workflow changes.

FAQ

Should an email agent ever send automatically?

Only for narrow, low-risk cases with explicit policy. Most founder, customer, investor, and support replies should be reviewed.

What is the most common failure?

Treating sender-provided instructions as if they were developer or user instructions.

What should the test output include?

The email fixture, expected behavior, actual tool calls, and whether any external send was attempted.

Test your system prompt

Apply what you just read. Scan your agent prompt for these vulnerabilities.

Scan My Agent
Scan Agent