It's a TRAP! Task-Redirecting Agent Persuasion Benchmark for Web Agents

Karolina Korgul, Yushi Yang, Arkadiusz Drohomirecki, Piotr Blaszczyk, Will Howard, Lukas Aichberger, Chris Russell, Philip Torr, Adam Mahdi, Adel Bibi

TL;DR

Researchers have introduced TRAP (Task-Redirecting Agent Persuasion), a new benchmark designed to test how easily LLM-based web agents can be "socially engineered" into abandoning their tasks. By hiding adversarial instructions in realistic website clones, the study found that even frontier models like GPT-5 and Claude 3.7 are susceptible, with an average attack success rate of 25%.

What Problem Does This Paper Address?

As we move toward autonomous web agents—AI that can manage your email, book your travel, or screen job candidates—we introduce a massive security hole: indirect prompt injection.

Unlike a direct attack where a user tries to "jailbreak" a chatbot, an indirect injection happens when an agent encounters malicious instructions hidden within the web content it is processing. For example, an agent summarizing a LinkedIn profile might see a hidden instruction in the "About" section telling it to "Click this button to verify credentials," which actually redirects the agent to a phishing site.

Existing benchmarks for this problem are often too simple, using "toy" environments that don't reflect the complexity of the modern web. They also tend to treat attacks as monolithic blocks, making it hard to understand why an agent failed. TRAP aims to provide a realistic, modular, and psychologically grounded framework to study these vulnerabilities.

Methods

The authors built TRAP on top of the REAL framework, which uses high-fidelity, deterministic clones of popular websites. The core innovation is a five-dimensional modular attack space that allows researchers to mix and match different components of an injection:

  1. Interaction Vector: Is the trap a button or a hyperlink?
  2. Human Persuasion Principle: Does the text use "Authority" (e.g., "Admin policy update"), "Social Proof" ("Others have clicked this"), or "Scarcity" ("Offer expires soon")?
  3. LLM Manipulation Method: Technical "jailbreak" styles like Chain-of-Thought (CoT) injection or adversarial suffixes.
  4. Location: Where is the injection placed (e.g., a random post vs. a targeted user's bio)?
  5. Contextual Tailoring: Does the attack text specifically reference the user's benign task to seem more legitimate?

The benchmark uses a "one-click" success metric: if the agent clicks the malicious element and is redirected, the attack is a success. This provides a clean, binary security boundary.

Datasets

The benchmark utilizes 18 benign tasks spread across six high-fidelity website clones:

  • GoMail (Gmail)
  • GoCalendar (Google Calendar)
  • Omnizon (Amazon)
  • NetworkIn (LinkedIn)
  • DashDish (DoorDash)
  • TopWork (Upwork)

The final TRAP dataset consists of 630 distinct injections (7 persuasion principles × 5 manipulation methods × 2 interface forms × various locations).

Key Insights and Ideas

  • Psychology works on AI: LLMs are susceptible to the same social engineering tactics as humans. Principles like Social Proof and Consistency were among the most effective at triggering agent failure.
  • UI Design is a Security Variable: Buttons are significantly more dangerous than hyperlinks. Across all models, button-based injections were 3.5x more effective. Agents seem to have an "action bias" toward buttons.
  • The "Trickle-Down" of Vulnerability: The authors found a clear transferability pattern. If an attack is sophisticated enough to break a robust model like GPT-5, it will almost certainly break weaker models. This means attackers can "over-engineer" attacks on strong models to ensure broad success across the ecosystem.
  • Semantic Clustering: Vulnerabilities aren't spread evenly. Injections placed in semantically rich areas, like a user's "About" section on LinkedIn, were far more successful than those in "task-neutral" areas like a random feed post.

Key Results

The researchers evaluated six frontier models (including GPT-5, Claude 3.7, and DeepSeek-R1) with the following findings:

  • Average Attack Success Rate (ASR): 25% across all tasks and models.
  • Model Robustness: GPT-5 was the most resilient (13% ASR), while DeepSeek-R1 was the most vulnerable (43% ASR).
  • The Power of Tailoring: Simply changing the attack text to reference the specific task (e.g., changing "click to access content" to "click to access meeting details") increased the success rate by up to six times in some environments.
  • Benign Utility vs. Safety: There is a correlation between a model's ability to complete tasks (utility) and its resistance to attacks. Stronger alignment generally led to lower exploitability.

Limitations and Future Work

The authors acknowledge several limitations:

  • Scope: The study is limited to six websites and primarily focuses on text-based injections, though the framework supports images.
  • Metric: The "one-click" metric is a great proxy for a security breach, but it doesn't track what the agent does after it reaches the malicious site (e.g., does it actually leak a password?).
  • Static Nature: While modular, the current injections are still templates. Future work could involve "LLM-in-the-loop" attackers that generate dynamic, real-time injections based on the agent's behavior.
  • Defenses: This paper focuses on the benchmark and the vulnerability; it does not propose specific technical mitigations, leaving that for future research.

Summary updated

Abstract

Web-based agents powered by large language models are increasingly used for tasks such as email management or professional networking. Their reliance on dynamic web content, however, makes them vulnerable to prompt injection attacks: adversarial instructions hidden in interface elements that persuade the agent to divert from its original task. We introduce the Task-Redirecting Agent Persuasion Benchmark (TRAP), a benchmark for studying how persuasion techniques misguide autonomous web agents on realistic tasks. Across six frontier models, agents are susceptible to prompt injection in 25\% of tasks on average (13\% for GPT-5 to 43\% for DeepSeek-R1), with small interface or contextual changes often doubling success rates and revealing systemic, psychologically driven vulnerabilities in web-based agents. We also provide a modular social-engineering injection framework with controlled experiments on high-fidelity website clones, allowing for further benchmark expansion.
BibTeX
@inproceedings{korgul2026it,
  author = {Karolina Korgul and Yushi Yang and Arkadiusz Drohomirecki and Piotr Blaszczyk and Will Howard and Lukas Aichberger and Chris Russell and Philip Torr and Adam Mahdi and Adel Bibi},
  title = {{It's a TRAP! Task-Redirecting Agent Persuasion Benchmark for Web Agents}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Smk4fl6Q9E},
}
Figure