AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents. Debenedetti, Zhang, Balunović, Beurer-Kellner, Fischer, and Tramèr. NeurIPS 2024, Datasets and Benchmarks Track.
- What they did
- Gave tool-using agents 97 realistic tasks in simulated email, messaging, travel, and banking environments, with 629 security test cases in which tool outputs carried injected instructions. Success was judged by the environment’s actual state.
- What they found
- In the paper’s comparison of models (its Table 3), targeted attacks succeeded 47.7% of the time against GPT-4o and 33.9% against Claude 3.5 Sonnet. In its comparison of defenses with GPT-4o (Table 5), targeted attacks succeeded 57.7% of the time with no defense, and 6.8% when the model chose the tools a task needs before it read any untrusted data and that choice was enforced. Both experiments use the paper’s “Important message” attack, yet report 47.7% and 57.7% for undefended GPT-4o, and the paper does not explain the difference. Its text gives 7.5% for the tool filter, its Table 5 6.84%. The restriction fails when the tools cannot be planned in advance, and also when the task’s own tools are enough for the attack, which the authors found in 17% of cases.
- Relevance
- The most effective defense tested limited the agent’s tools before it read untrusted data and enforced that limit outside the model.