atlas

Research map / Adversarial robustness and security / Attacks on text and graphs

AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents

NeurIPS 2024 · Adversarial robustness and security › Attacks on text and graphs · approach: LLM jailbreak and injection defense · 83 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces AgentDojo, an extensible environment with 97 user tasks and 629 security test cases for measuring prompt injection attacks and defenses on tool-calling LLM agents.

Problem

Prompt injection attacks hijack LLM agents through untrusted tool outputs, and existing benchmarks either lack multi-step stateful tool calling or rely on LLM simulators that can themselves be fooled by injections.

Approach

A dynamic, stateful agent environment where utility and security are checked by deterministic functions over environment state (not LLM judges), with user tasks crossed with injection tasks and pluggable attacks and defenses.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use the Important message phrasing instead of TODO, Ignore previous instructions, or InjecAgent prompts (ablation)GPT-4o prompt injection attack · AgentDojo security casestargeted ASR: 3.66% -> 57.7%; 5.41% -> 57.7%; 5.72% -> 57.7%Helped
Select the most effective prompt per task (Max) rather than use one fixed attack prompt (ablation)GPT-4o prompt injection attack · AgentDojo security casestargeted ASR: 57.7% -> 57.55%Helped
Include correct user and model names in the injection (ablation)Important message attack on GPT-4o · AgentDojo security casestargeted ASR: +1.9%Helped
Address GPT-4o using an incorrect model name (ablation)Important message attack on GPT-4o · AgentDojo security casestargeted ASRHurt
Add data delimiters to tool outputs and instruct the model to ignore enclosed instructions (ablation)GPT-4o · AgentDojo security casestargeted ASR: 57. 69% -> 41.65%Helped
Add prompt injection detection and abort when detected (ablation)GPT-4o · AgentDojo security casestargeted ASR: 57. 69% -> 7.95%Helped
Add prompt injection detection and abort when detected (ablation)GPT-4o · AgentDojo utility casesbenign utility: 69.0% -> 41.49%Hurt
Repeat the user prompt after each tool call (ablation)GPT-4o · AgentDojo security casestargeted ASR: 57. 69% -> 27.82%Helped
Restrict available tools before observing untrusted data (ablation)GPT-4o · AgentDojo security casestargeted ASR: 57. 69% -> 6.84%Helped
Use the Important message attack rather than untargeted denial-of-service attacks (ablation)GPT-4o agent · AgentDojo security casessuccess rateHelped
Place the injection at the end of a tool response (ablation)GPT-4o prompt injection attack · AgentDojo security casestargeted ASR: up to 70%Helped

Surprising findings

Limitations

Experimental setup

Datasets: AgentDojo task suites (Workspace, Slack, Travel, Banking)

Benchmarks: AgentDojo

Metrics: benign utility utility under attack targeted attack success rate untargeted attack success rate

Baselines: Claude 3 Opus Claude 3 Sonnet Claude 3.5 Sonnet GPT-4 Turbo GPT-4o GPT-3.5 Turbo Gemini 1.5 Pro Gemini 1.5 Flash Command R+ Llama 3 70B

Builds on: ToolEmu InjecAgent Berkeley Tool Calling Leaderboard AutoAttack GCG

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy