Control at Stake: Evaluating the Security Landscape of LLM-Driven Email Agents

Jiangrong Wu, Yuhong Nan, Jianliang Wu, Zitong Yao, Zibin ZhengarXiv 2025 · DOI

Introduction

As Large Language Models (LLMs) evolve from passive chatbots into autonomous "agents," they are increasingly granted access to external tools via APIs. Email agents, capable of summarizing inboxes or drafting replies, represent a significant productivity leap. However, this autonomy introduces a critical security vulnerability: instruction-data confusion. Because LLMs often fail to distinguish between developer-provided system prompts and external data (like the body of an email), they are susceptible to Email Agent Hijacking (EAH).

The EAHawk Methodology

To systematically evaluate this threat, researchers developed EAHawk, an automated pipeline designed to identify and exploit vulnerabilities in email agents. The pipeline operates in three distinct phases:

  1. Email Agent Identification: Scanning frameworks like LangChain or LlamaIndex to find agents with email-related permissions (e.g., send_email, search_email).
  2. Attack Prompt Generation: Utilizing models like DeepSeek-R1 to craft sophisticated, two-step prompts that bypass standard safety filters.
  3. Hijacking Confirmation: Testing the generated prompts in a controlled environment to verify if the agent executes malicious sequences, such as exfiltrating data.
The EAHawk pipeline for identifying, generating, and confirming email agent hijacking.

Anatomy of a Hijack

The core of the EAH attack lies in the "two-step" malicious email body. Unlike simple prompt injections, these attacks use a Fake System Prompt to spoof administrative updates and disable safety checks, followed by a Deceptive User Prompt that fabricates a high-priority request from the legitimate owner.

Structure of a malicious email body featuring fake system prompts and deceptive user instructions.

By "wrapping" malicious instructions in a format that mimics system-level configuration, attackers can trick the LLM into prioritizing the attacker's goals over the original user's intent. A particularly dangerous feature is the "Dual-Path" stealth attack, where the agent is instructed to complete the user's original request after the malicious action, making the hijack nearly invisible to the end-user.

Key Results and Evaluation

The study tested 1,404 real-world email agent instances across 14 frameworks and 12 state-of-the-art LLMs (including GPT-4o, Gemini 2.0, and Claude 3.7). The findings are stark:

  • 100% Success Rate: Every single agent instance tested was successfully hijacked.
  • Minimal Effort: For many models, including DeepSeek-v3 and Llama 3, full takeover required an average of only 1.23 attempts.
  • Universal Vulnerability: Even "premium" models with advanced safety training succumbed to the multi-step EAHawk prompts, typically within 2.03 attempts.
  • Primitive Chaining: Attackers successfully orchestrated complex frauds by chaining basic operations like search, retrieve, create_draft, and send to exfiltrate sensitive data.

Conclusion and Future Directions

The 100% hijack rate across diverse frameworks and models indicates a fundamental flaw in current agent architectures: an unconditional trust in LLM output. To secure future AI agents, the research suggests moving toward semantic validation—middleware that checks if an LLM's requested action aligns with the original user intent—and architectural changes that isolate instructions from external data channels to prevent text-based data from being interpreted as code.

Summary updated

BibTeX
@misc{wu2025control,
  author = {Jiangrong Wu and Yuhong Nan and Jianliang Wu and Zitong Yao and Zibin Zheng},
  title = {{Control at Stake: Evaluating the Security Landscape of LLM-Driven Email Agents}},
  year = {2025},
  eprint = {2507.02699},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.02699},
}
Figure