AgentDojo: A dynamic environment for evaluating prompt injection attacks and defenses on LLM agents
AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents
The authors propose AgentDojo, a dynamic environment for evaluating prompt injection attacks and defenses on tool-calling agents, containing 97 tasks and 629 security test cases; GPT-4o without defenses has a targeted ASR of 47.69%.
- LLM agents that call tools to process untrusted third-party data are vulnerable to being hijacked by indirect prompt injection and made to execute attacker tasks; existing agent benchmarks do not include explicit attacks, and existing prompt injection benchmarks lack realistic multi-turn tool-calling scenarios.
- The authors build AgentDojo: four stateful environments (Workspace, Slack, Travel, Banking), with the Cartesian product of 97 user tasks and injection tasks yielding 629 security test cases, using deterministic utility/security functions to check environment state and determine success or failure, and providing multiple preset attacks and defenses.
- For all 10 LLMs, benign utility without attack does not exceed 78.22%; GPT-4o without defenses has a targeted ASR of 47.69%, and the Tool filter defense reduces it to 6.84%; the authors state that more capable models are more vulnerable to attack, and that placing the injection at the end of the tool output is most effective.
- The authors note that current attacks and defenses are relatively simple, that task and utility criteria are manually specified, and that scenarios such as multimodal agents and multi-task settings without resetting context are not covered; defense evaluation was conducted only on GPT-4o, and the paper does not report the number of repeated runs.
- Threat model
- Indirect prompt injection: the attacker injects malicious instructions into untrusted third-party data returned by the agent's tools (attack placeholder), with the goal of making the agent perform a malicious task on the user's behalf (injection task, such as stealing data or transferring money). The attacker's prior knowledge of the user task, the system, or victim information can vary (the paper ablates the effect of knowing the user/model name); the victim system is an LLM agent that calls tools in four environments: Workspace, Slack, Travel, and Banking.
- Evaluated models
- Claude 3 OpusClaude 3 SonnetClaude 3.5 SonnetCommand-R+Gemini 1.5 FlashGemini 1.5 ProGPT-3.5 TurboGPT-4 TurboGPT-4o (gpt-4o-2024-05-13)Llama 3 70B
- Benchmarks
- AgentDojo(Workspace、Slack、Travel、Banking 四个任务套件)
- Metrics
- Benign UtilityUtility Under AttackTargeted ASRUntargeted ASR
Researchers from ETH Zurich and other institutions released AgentDojo, a dynamic benchmark environment for evaluating the effectiveness of LLM agents in resisting prompt injection attacks and defenses during tool calls. The environment includes four types of scenarios—Workspace, Slack, Banking, and Travel—with a total of 97 real tasks and 629 security test cases, and supports extending new tasks, attacks, and defenses. On GPT-4o, without defenses the targeted attack success rate is 57.7%, and tool filtering defense reduces it to 6.84%; although the prompt injection detector reduces the attack success rate to 7.95%, it reduces normal utility from 69.0% to 41.49%. The evaluation also shows that more capable models are often more susceptible to attacks, and existing attacks and defenses both face notable challenges on AgentDojo.
Why it was selectedThe paper presents AgentDojo's task design and baseline evaluation, which can be used to compare the trade-offs between utility and security of different agents and prompt injection defenses.
Related events and news
15 events · 28 news mentions
- The reports mention AgentDojo
DeepMind论文称智能体集群攻破所测模型
- The reports cite this paper
Composio介绍Agent防火墙拦截提示注入
- The reports mention AgentDojo
Scale AI 提出 MRT 框架测试智能体监控可靠性
- The reports cite this paper
AppSec中的本地LLM:哪些工作可放心交给开放工具和模型
- The reports mention AgentDojo
AI渗透测试智能体:能验证漏洞,难从零发现
News that mentions this paper
DeepMind论文称智能体集群攻破所测模型
- The Merklenames the paperDeepMind论文:智能体集群在完整预算下攻破Kimi K3等三模型约99%场景
Against the best prior open-source attacker, Prompt Siren, the gap was blunt: on 80 AgentDojo scenarios, Siren broke 2, while the swarm broke 6 on a budget of only 25 queries.
Composio介绍Agent防火墙拦截提示注入
- Composiocites the paper's id or linkAI 智能体读取邮件或调用工具时,如何阻止提示注入
The AgentDojo paper evaluates attacks and defenses in simulated tool-using environments, including email, files and Slack workflows.
Scale AI 提出 MRT 框架测试智能体监控可靠性
- 公众号 为机器立心names the paperScale AI 提出 MRT 框架,红队测试 LLM 智能体监控系统并给出混合监控架构
主任务为良性目标(如预订航班),副任务为恶意行为(如仅预订高价航班),基于AgentDojo环境
Show 25 more news items
AppSec中的本地LLM:哪些工作可放心交给开放工具和模型
- Хабрcites the paper's id or linkAppSec 中的本地 LLM:哪些工作可以放心交给开放工具和模型
записи — разные возможности причинить ущерб. Поэтому в исследованиях безопасности агентов оценивают сразу две вещи: удалось ли атакующему добиться своей цели и сохранила ли система способность
AI渗透测试智能体:能验证漏洞,难从零发现
- Хабрnames the paper“你的智能体弄垮过生产环境吗?”2026年AI渗透测试能做什么、仍有哪些不足
ход программы. Политики проверяют каждый вызов инструмента. В AgentDojo CaMeL решил 77% задач с доказуемой защитой против 84% у системы без защиты.
- General Analysisnames the paperIPI Bench:针对职场 Agent 的间接提示注入评测
The four environments of AgentDojo together contain only about 150 records, while IPI Bench's world is seeded with thousands of records of assorted types.
- dedene/DeepSeek-V4.1-Flash-1017-DGX-Sparknames the paper在单台 DGX Spark 上运行 DeepSeek V4.1 Flash 1017(ds4-dfm-rs、Docker Compose)
AgentDojo, tasks done without an attack, n=96 82.3 (73–89) 84.4 77.1 85.4 75.0
- BeyondTrustcites the paper's id or linkAI 智能体安全控制:硬边界还是软请求?
AgentDojo (NeurIPS 2024): https://arxiv.org/abs/2406.13352
- Хабрcites the paper's id or linkLLM外围防护:AI网关如何降低泄露与提示注入风险
AgentDojo: бенчмарк защит агентных систем
- Opper AInames the paper用决策模型自建提示注入分类器,或直接开启检查
jackhhao), attacks hidden in tool results (BIPIA, InjecAgent, AgentDojo), non-English attacks, and harmless prompts that look like attacks.
- Failure-Firstnames the paper50 轮潜伏者:Agent 如何把指令藏在明处
AgentDojo’s baseline finding adds context: even without adversarial pressure, state-of-the-art LLMs complete many multi-step tasks successfully less than 66% of the time.
- Failure-Firstcites the paper's id or link长时程 Agent 执行中的指令层级颠覆
AgentDojo (arXiv:2406.13352, NeurIPS 2024) established the baseline: state-of-the-art LLMs achieve benign utility rates below 66% in multi-step tasks without adversarial pressure.
- Failure-Firstnames the paperVLA 模型中的跨本体对抗迁移
MITRE ATLAS and AgentDojo address digital-only attack surfaces.
- Failure-Firstnames the paper攻击分类框架收敛:六个对抗 AI 框架在哪里一致
AgentDojo evaluates 97 realistic tasks with 629 security test cases.
- MDPIgives the paper's title研究评估嵌入预过滤,将百万级 LLM Agent 社交网络消息筛查成本降低最高 65.6%
AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents.
- OpenAI Alignment Researchcites the paper's id or linkOpenAI 披露可自我复制的提示注入,基于 GPT-5.4-mini 与 GPT-5.5 内部检查点
Debenedetti, E., et al. (2024).AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents.
- Mindgard Blognames the paperMindgard 发布 AI Agent 安全指南:五类信任边界、六种攻击与红队加固方法
AgentDojo’s repository of known attacks only worked 11% of the time.
伯克利提出提示注入防御方案PromptArmor
- 公众号 为机器立心names the paper加州大学伯克利分校提出 PromptArmor:模块化易部署,现成 LLM 驱动的高效提示注入防御方案
基准测试集:AgentDojo(Debenedetti et al., 2024),包含银行、Slack、旅行、工作空间4类代理,共629个对抗场景,涵盖4种典型攻击(Ignore Previous Instructions、System Message、Important Messages、Tool Knowledge);
Adversa AI 汇总 11 月 AI 智能体安全资源
- Adversa AInames the paper2026 年 11 月 AI 智能体安全资源汇总
A declarative source trust policy decides most effects and holds ambiguous ones for a bounded oracle, cutting AgentDojo attack success from 47.0% to 2.7% with benign utility at the undefended level.
HoS:学习式注意力门控防御提示注入
- AI Security and Privacy Lab, Imperial College Londonnames the paperHeads of Security:学习型注意力门控提升提示注入鲁棒性
Compared to SecAlign and ASIDE, HoS matches top performance on agentic prompt injection benchmarks (AgentDojo, AgentDyn, WASP and LLMail).
SRFT自我反思微调提升Agent抗提示注入能力
- 安全内参 / 模安局names the paper大模型自我反思微调,让 Agent 学会抵御未知的提示注入
在 AgentDojo 提示注入测试中,SRFT 将 Llama-3.1-8B 的攻击成功率从 7.59% 降低至 1.26%,将 Qwen3-8B 的攻击成功率从 16.97% 降低至 1.05%。
- 公众号 模安局names the paper大模型自我反思微调 SRFT,让 Agent 学会抵御未知的提示注入
在 AgentDojo 提示注入测试中,SRFT 将 Llama-3.1-8B 的攻击成功率从 7.59% 降低至 1.26%,将 Qwen3-8B 的攻击成功率从 16.97% 降低至 1.05%。
研究揭示保留词元编码放大提示注入攻击
- 科技行者names the paper同样的文字,不一样的权力:AI 提示词注入中的保留词元实验
2026年发表的ChatInject论文显示,这种手法能把AgentDojo基准上的攻击成功率从5.18%拉到32.05%,涨了六倍还多。
研究揭示多Agent系统边界洗白攻击并提出multi-CaMeL
- 公众号 模安局names the paper每个 Agent 都安全,为什么系统还是会被攻破?跨 Agent 信任洗白与双通道防御
第二套是作者基于 AgentDojo 扩展构建的 MultiAgentDojo。
Reflection 开放 Beam 权重并发布安全报告
- Reflectiongives the paper's titleReflection 发布 Beam 安全技术报告
AgentDojo: A dynamic environment to evaluate prompt injection attacks and defenses for LLM agents (arXiv Publication No. 2406.13352). arXiv. https://doi.org/10.48550/arXiv.2406.13352 Cited by: 1438
NVIDIA 提出 NXDirection 防御提示注入
- NVIDIA:可信 AI 与网络安全cites the paper's id or linkNVIDIA 提出 NXDirection:沿指令方向让外部内容不可执行
Evaluating on BIPIA and AgentDojo
Adversa AI 发布 10 月 GenAI 安全资源汇总
- Adversa AInames the paperAdversa AI 的 GenAI 安全资源精选(2026 年 10 月)
It cut AgentDojo compromise below 8% at 93 to 100% benign utility, though parameter manipulation inside legitimate calls is only partially blocked.
Adversa AI 汇总 10 月 AI Agent 安全资源
- Adversa AInames the paperAdversa AI 汇总 2026 年 10 月 AI Agent 安全资源 49 项
On AgentDojo and AgentDyn it executed no malicious calls and outperformed CaMeL and IPIGuard.
Paper analysis
What problem does this paper attempt to solve?
To evaluate the utility and security of tool-calling LLM agents under indirect prompt injection, the authors propose the dynamic benchmark AgentDojo.
Core question: how to quantitatively evaluate the utility and security of tool-calling LLM agents under indirect prompt injection attacks.
- Problem setting: AI agents combine LLM reasoning with external tool calls to complete tasks, but LLMs process text directly and lack a formal means of distinguishing instructions from data (the authors cite [44, 74]). Third-party data returned by tools can be injected with malicious instructions, and a successful attack can let the attacker call tools in the user's name, with consequences including theft of user data and execution of arbitrary code.
- Shortcomings of existing benchmarks: the authors state that existing agent benchmarks either evaluate only single function calls or have no explicit attacks; existing prompt injection benchmarks have simple scenarios and do not involve tool calls; ToolEmu uses an LLM to simulate the environment and score, and an injection may fool both the simulator and the judge model.
- Core design claim: static attack sets are unsuitable for evaluating prompt injection robustness—existing injection attacks are generic and not optimized for a specific model, and defenses against fixed attacks can easily be built that are not robust; therefore the benchmark should be an extensible dynamic environment supporting new tasks, new defenses, and adaptive attacks.
- Paper output: the AgentDojo framework, whose first version contains 4 environments, 97 user tasks, 629 security test cases, and 70 tools (Table 1 note: elsewhere the main text says 74 tools), as well as multiple attack and defense paradigms from the literature.
- Threat model (indirect prompt injection):
- Attacker goal: make the agent complete an injection task, such as sending the user's security verification code to the attacker's email or transferring money to the attacker's account.
- Attacker capability: control the attack placeholder in untrusted data returned by tools, such as an email in the user's inbox or a web page.
- Attacker knowledge: variable; the paper ablates prior knowledge of the user name and model name, where correct knowledge slightly strengthens the attack and incorrect guesses weaken it (Table 2).
- Victim system: an LLM agent that calls tools in four simulated environments: Workspace, Slack, Travel, and Banking.
What related research exists?
Related work falls into four groups: agents and tool-augmented LLMs, prompt injection attacks, prompt injection defenses, and agent and injection benchmarks; this paper is closest to InjecAgent and ToolEmu.
AI agents and tool-augmented LLMs
- ToolFormer [51], PAL [14], Chameleon [35], HuggingGPT [53], etc.—enable LLMs to call external tools to complete tasks; ReAct [69], chain-of-thought [60], etc. provide reasoning and planning capabilities.
- Gorilla [43], ToolLLM [47]—large-scale API calling; several vendors provide function-calling interfaces [2, 9, 22].
Prompt injection attacks
- Willison [62], Goodside [17]—proposed the concept of prompt injection; Perez and Ribeiro [44] distinguish direct from indirect injection.
- Greshake et al. [18], Kang et al. [23], Liu et al. [33]—showed that indirect injection can compromise real LLM-integrated applications; Pasquini et al. [42] learn injection triggers.
Prompt injection defenses
- Detection-based: Lakera ChainGuard [28], ProtectAI detector [45], LangChain's HF detection [29].
- Training/prompting-based: StruQ [8], Instruction Hierarchy [59], Spotlighting data delimiting [19]; Willison points out that delimiters do not solve the problem [61].
- Isolation-based: Dual LLM pattern [63], SecGPT [66]—isolate function calling from the main planning component. The authors state that none of the existing techniques is foolproof and that they may not provide guarantees for safety-critical tasks [61, 64].
Agent and prompt injection benchmarks
- AgentBench [32], WebArena [72], WebShop [68], Berkeley Function Calling Leaderboard [67], etc.—evaluate agent capabilities but have no explicit attacks.
- ToolEmu [50]—uses an LLM to simulate a sandbox and score to evaluate agent risk; the authors point out that this approach is problematic for evaluating prompt injection because the injection may simultaneously hijack the judge model.
- Tensor Trust [57], HackAPrompt [52], Liu et al. [34], Yi et al. [70]—prompt injection benchmarks, but with simple scenarios and no tool-call planning.
- InjecAgent [71]—closest to this paper, but the authors point out that it is a simulated single-turn scenario: a single adversarial data item is fed directly to the LLM as tool output, without evaluating the model's planning.
Baselines and comparisons: attack baselines are "ignore previous instructions" [17], InjecAgent injection [71], "TODO" injection, and the adaptive Max attack; defense baselines are Data delimiters [19], PI detector [45], Prompt sandwiching [30], Tool filter (a simplified form of the isolation mechanism [63, 66]); utility is compared with the Berkeley Tool Calling Leaderboard [67] (Figure 2).
Authors' positioning: AgentDojo requires agents to dynamically call multiple tools in stateful, adversarial environments and uses formalized environment-state checks instead of LLM judging, distinguishing it from all the above benchmarks.
How does the paper address this problem?
AgentDojo builds task suites with stateful environments plus formalized success/failure checks, takes the Cartesian product of user tasks and injection tasks, and provides extensible preset attack and defense interfaces.
Overall approach: place the agent in a stateful simulated environment to perform real tool calls, and use deterministic state-checking functions to separately determine whether the user task (utility) and the attacker goal (security) are achieved, avoiding the use of an LLM judge that could be hijacked by injection.
Environments, tools, and tasks
- Four environments: Workspace (email/calendar/cloud drive, 24 tools, 40 user tasks, 6 injection tasks), Slack (11, 21, 5), Travel (28, 20, 7), Banking (11, 16, 9), totaling 70 tools, 97 user tasks, and 27 injection goals (Table 1).
- State modeling: environment state is a collection of mutable objects (e.g., inbox, calendar, cloud drive), pre-filled with fake data that is manually written or generated with GPT-4o/Claude 3 Opus assistance and manually checked; some states are marked as attack placeholders.
- Tools: registered as Python functions (FastAPI style), with documentation added to the agent prompt, and outputs fed to the model in YAML format.
- Task difficulty: user tasks cover medium-to-long context retrieval (up to 7,000 GPT-4 tokens of data and 4,000 tokens of tool descriptions) and tool-call chains of up to 18 calls; injection tasks range from 1 step to 20 steps, with sensitivity ranging from sending an ordinary email to forwarding a two-factor verification code.
Success determination
- utility function: a deterministic binary function that takes the model output and the environment state before and after execution and determines whether the user task is completed; each user task also comes with a ground truth tool-call sequence, used to place injections where the model will actually query.
- security function: similarly determines whether the attacker goal is achieved; injection tasks also come with ground truth call sequences, for attacks that know the tool API.
- Test cases: following Zhan et al. [71], the Cartesian product of user tasks and injection tasks for each environment yields 629 security test cases; running user tasks alone constitutes the benign utility test.
Agent and defense interfaces
- agent interface: only a query function needs to be implemented, receiving the user instruction, tool list, and environment state; it supports composing LLMs, tool-execution loops, injection detectors, etc. into modular pipelines (Appendix Figures 11 and 12 give components and examples).
- Built-in defenses: Data delimiters (following Hines et al. [19], add delimiters to tool outputs and instruct the model to ignore instructions within them), PI detector (ProtectAI's BERT classifier detects each tool output and aborts on a hit), Prompt sandwiching (repeat the user instruction after each function call), Tool filter (a simplified isolation mechanism: first select the needed tools, then contact untrusted data).
Attack interface and metrics
- attack interface: the attack function takes an injection task and returns injection text for each attack placeholder; get_injection_candidates uses the user task's ground truth call sequence to find placeholders that will be queried (Appendix A).
- Three metrics: Benign Utility (user task completion rate without attack); Utility Under Attack (the proportion that both completes the user task and has no side effects under attack; its complement is untargeted ASR); Targeted ASR (the proportion in which the attacker goal is achieved).
- Attack set: for an attack set {A1,…,An}, success by any attack counts as success, modeled as an adaptive attacker that selects the best attack for each case (citing [6]).
What experiments did the paper conduct?
Full evaluation of 10 LLMs plus attack/defense ablations on GPT-4o: utility without attack is at most 78.22%, GPT-4o ASR without defenses is 47.69%, and Tool filter reduces it to 6.84%.
Experimental setup
- Models tested (10): Claude 3 Opus, Claude 3 Sonnet, Claude 3.5 Sonnet, GPT-3.5 Turbo, GPT-4 Turbo, GPT-4o, Gemini 1.5 Flash, Gemini 1.5 Pro, Llama 3 70B, Command R+; all except Llama 3 use the official API's function calling.
- Benchmark: the full AgentDojo set of 629 security test cases and 97 user tasks; attack and defense ablations use only GPT-4o (the authors state it has the highest benign utility; Claude Opus has similar utility but access is restricted).
- Baseline attack: "Important message" injection (found effective in preliminary experiments); the ablation compares TODO, Ignore previous, InjecAgent injections, and adaptive Max.
- Baseline defenses: Data delimiters, PI detector (ProtectAI BERT), Prompt sandwiching (listed as Repeat prompt in the table), Tool filter.
- Metrics and determination: Benign Utility, Utility Under Attack, Targeted/Untargeted ASR, all determined by deterministic utility/security functions based on environment state, without an LLM judge.
- Error and cost: 95% confidence intervals are reported (statsmodels proportion_confint); running the full 629 cases on GPT-4o costs about $35, and the 97 utility cases about $4 (Appendix D); the paper does not report the number of repeated runs.
Main results
According to Table 3 (Important message attack, 95% confidence intervals omitted):
Swipe horizontally to read the table
Model Benign utility Utility under attack Targeted ASR Claude 3.5 Sonnet 78.22 51.19 33.86 GPT-4o 69.00 50.08 47.69 Claude 3 Opus 66.61 52.46 11.29 GPT-4 Turbo 63.43 54.05 28.62 Claude 3 Sonnet 53.10 33.23 26.71 Gemini 1.5 Pro 45.63 28.93 25.60 Gemini 1.5 Flash 36.09 34.18 12.24 Llama 3 70b 34.50 18.28 20.03 GPT-3.5 Turbo 33.86 34.66 8.43 Command-R+ 25.44 25.12 0.95 - The authors state that more capable models tend to be more vulnerable to attack, regarding this as a form of inverse scaling [38]; they explain that low-utility models often fail to correctly execute the attacker goal even when the injection succeeds.
- The authors state that benign utility and utility under attack are strongly correlated, with most models losing 10%–25% absolute utility under attack (Figure 6b).
- The authors state that in the benign setting the most capable is Claude 3.5 Sonnet, followed by GPT-4o, and that the former has a better utility-security trade-off.
Attack ablation (GPT-4o)
- Injection wording matters greatly: according to Table 4, targeted ASR is TODO 3.66%, Ignore previous 5.41%, InjecAgent 5.72%, and Important message 57.7%, respectively; adaptive Max has an untargeted ASR of 68.36% (the main text states Max raises the success rate by a further 10%).
- Attacker knowledge: according to Table 2, the baseline is 45.8%; when both the username and model name are correct it is 47.7% (+1.9%); guessing the wrong user or model name lowers it to 23.2% and 23.7%, respectively. The authors state that the benefit of prior knowledge is limited, and wrong guesses weaken the attack.
- Injection position: the authors state that placing the injection at the end of the tool-returned text is most effective, with an average success rate of up to 70% for GPT-4o (Figure 21a); the Slack suite reaches an ASR of 92%, which the authors suggest may be related to the attacker controlling a larger proportion of tool outputs (Figure 21b); for Travel suite injection task 6 the success rate is 0%, and the authors find that the model often completes only one of the two unrelated malicious subtasks.
Defense evaluation (GPT-4o)
According to Table 5 (against the strongest attack):
Swipe horizontally to read the table
Defense Benign utility Utility w. attack Targeted ASR No defense 69.0% 50.01% 57.69% Delimiting 72.66% 55.64% 41.65% PI detector 41.49% 21.14% 7.95% Repeat prompt 85.53% 67.25% 27.82% Tool filter 73.13% 56.28% 6.84% - The authors state that several defenses instead increase benign utility (presumably because they emphasize the original instruction more); the PI detector has many false positives and harms utility.
- Tool filter is most effective: ASR drops to 6.84% (elsewhere in the main text written as 7.5%); the authors note that it fails when tools cannot be planned in advance, or when the tools needed to solve the task suffice to carry out the attack (the latter accounts for 17% of test cases).
- The authors believe Repeat prompt is effective against current attacks but unlikely to resist adaptive attacks (e.g., injections instructing the model to ignore future instructions).
Other ablations and analyses
- Difficulty comparison: the authors state that AgentDojo benign tasks are harder than the Berkeley Tool Calling Leaderboard (Figure 2; Llama 3 70B used a different prompt).
- DoS attacks: untargeted attacks such as requests to stop, profanity, and Captcha are all less able to derail the model than targeted attacks with malicious goals (Figure 20).
- Cost: the full security cases on GPT-4o cost about $35 (Appendix D).
What are some points that can be further explored?
The authors list five extension directions (stronger attacks and defenses, automated task generation, harder tasks, multimodality, injection constraints); experiments cover 10 models, and defenses are tested only on GPT-4o.
Limitations and future directions noted by the authors
- Attacks and defenses are relatively simple (Section 5): the current attacks and defenses used are relatively simple; future work could add more complex defenses (e.g., isolated LLM [63, 66]) and attacks [15].
- Tasks are manually specified (Section 5): extending to more tasks and attack goals may require automating the current process of manually specifying tasks and utility criteria, while not sacrificing evaluation reliability.
- Harder tasks are needed (Section 5): tasks that tool-selection defenses (or more complex isolation mechanisms) cannot directly solve are especially worth adding.
- Multimodality is not supported (Section 5): it could be extended to multimodal agents handling both text and images, expanding the range of tasks and attacks.
- Injections are unconstrained (Section 5): adding constraints such as length or format to prompt injections could better characterize real attacker capabilities.
- Failure scenarios of the Tool filter (Section 4.3): it fails when the tool list cannot be planned in advance, or when the tools needed to solve the task suffice to carry out the attack (17% of use cases); AgentDojo does not yet cover scenarios where a user gives multiple tasks over time without resetting context.
Scope of experimental coverage
- 10 models were tested (Table 3); the main attack is Important message injection; the attack-wording ablation includes 4 injections plus adaptive Max (Table 4).
- Defense evaluation was conducted only on GPT-4o, including 4 defenses (Table 5); the attacker-knowledge ablation also used only GPT-4o (Table 2).
- Each model was run on the full 629 security test cases and 97 user tasks; the paper reports 95% confidence intervals but does not report the number of repeated runs.
- The injection-position analysis targets GPT-4o (Figure 21a); DoS-type untargeted attacks were compared across four suites (Figure 20).
- The benign difficulty comparison uses reported results from the Berkeley Tool Calling Leaderboard; Llama 3 70B used a different prompt (Figure 2 footnote).
Summarize the main content of the paper
AgentDojo: a dynamic prompt injection attack-defense benchmark containing 97 tasks and 629 security cases; existing models are insufficient in both utility and robustness, and both attack and defense remain challenging.
AgentDojo is a dynamic benchmark framework for evaluating the utility and security of tool-calling LLM agents under indirect prompt injection, designed to address the problems that existing agent benchmarks have no explicit attacks, injection benchmarks have no realistic multi-turn tool calling, and LLM-simulated judges are easily hijacked by injection.
- Problem addressed: attackers hide malicious instructions in untrusted data returned by tools, hijacking the agent to perform malicious tasks in the user's name (e.g., stealing data, transferring money); how to reliably measure progress in attack and defense under this threat.
- Method highlights: four stateful environments (Workspace, Slack, Travel, Banking), 70 tools, 97 user tasks, and 27 injection goals combined via Cartesian product to yield 629 security test cases; deterministic utility/security functions check environment state to determine success or failure; attacks, defenses, and agents are all extensible interfaces.
- Main results: for 10 models without attack, benign utility is at most 78.22% (Claude 3.5 Sonnet, Table 3); GPT-4o without defenses has a targeted ASR of 47.69%, while Command R+ is only 0.95% (Table 3); the authors state that more capable models are more vulnerable to attack.
- Attack and defense findings: injection wording matters greatly; the Important message attack has an ASR of 57.7%, far higher than the 5.72% of the InjecAgent injection (Table 4); placing the injection at the end of the tool output is most effective (up to 70%); the Tool filter defense reduces GPT-4o's ASR to 6.84%, and the PI detector to 7.95% but with benign utility dropping to 41.49% (Table 5).
- Authors' conclusion: AgentDojo poses a challenge to both attackers and defenders—existing attacks can break some but not all security properties, and existing defenses are all imperfect; the authors believe that resisting stronger adaptive attacks may require a breakthrough in LLMs' ability to distinguish instructions from data, and hope AgentDojo will serve as a continuously updated benchmark to measure progress.