Skip to content
IAM Insights

Briefing · Paper · source · updated · Boston Identity

AgentPoison's few poisoned memory entries steered agents 62.6% of the time on average, not the abstract's 80%

AgentPoison, a 2024 paper from researchers at Chicago, Illinois, Wisconsin and Berkeley, backdoors AI agents by planting a few entries in their memory or knowledge base and waiting for a trigger phrase. End to end it worked 62.6% of the time on average, not the 80% the abstract leads with. It also assumes the attacker can write to the store, and never asks who should be allowed to.

arXiv · Zhaorun Chen, Zhen Xiang, Chaowei Xiao, Dawn Song, Bo Li · July 17, 2024 · read

share
12,136 words. With Zhaorun Chen et al., author, University of Chicago, UIUC, UW-Madison, UC Berkeley.
01

What's happening

Finding4
BI-FIND-2024-0039Lead finding

On benchmark data, 20, 4 or 2 planted entries steered three agents to the attacker's chosen result 62.6% of the time on average when a query held the trigger.

Chen, Xiang, Xiao, Song and Li planted 20, 4 and 2 crafted entries in the memory or knowledge base of three research agents: Agent-Driver, a driving planner; a ReAct agent answering StrategyQA questions from Wikipedia passages; and EHRAgent, which works on health records. When a query carried their optimized trigger phrase, the agent reached the attacker's chosen end result 62.6% of the time on average, with individual setups between 53.7% and 72.5%. Queries without the trigger lost 0.74% accuracy on average, and the attack needs no model training. All of it ran on benchmark data, not deployed systems.

high confidencebest source: independent researchobserved Jul 2024EvidenceSection 3Method: constrained trigger optimization
flag a problem with BI-FIND-2024-0039
Figure steps
  1. The attacker adds a few crafted entries to the agent's memory or knowledge base: 20, 4 or 2 in the tests. Each pairs a query carrying the trigger with the attacker's chosen action. The paper tests no control on who may write here.
  2. A query reaches the agent with the optimized trigger phrase in it. The paper does not say how the trigger gets there.
  3. The agent looks up similar past examples, and the trigger pulls back the poisoned ones: on average 81.2% of runs retrieved only poisoned examples.
  4. The agent follows the examples to the attacker's end result, such as a sudden stop, in 62.6% of runs on average.
Fig. 1

The attacker never touches the model: a few entries written into the agent's memory, and a trigger phrase in a later query, bring those entries back as the examples the agent copies.

Drawn from the paper's threat model and its figure 1Source dated July 17, 2024Passage: Method: constrained trigger optimization

Swipe for the full figure →

BI-FIND-2024-0040

The abstract's average success rate of at least 80% is the retrieval figure, while the body reports 62.6% for the attack working end to end.

The abstract's headline, an average attack success rate of "≥ 80%" at a poison rate under 0.1%, is the retrieval figure. The body reports 81.2% for runs where every retrieved example was a poisoned one, and 62.6% for the attack working end to end. The poison rate holds for the driving agent (20 entries among 23k) and the question-answering agent (4 among 10k). EHRAgent starts with only four stored experiences; because almost every baseline attack succeeded against so few, the authors enlarged its memory to 700 and planted two, about 0.29%.

high confidencebest source: independent researchobserved Jul 2024EvidenceSection 3
flag a problem with BI-FIND-2024-0040
BI-FIND-2024-0041

Under a perplexity filter and query rephrasing, AgentPoison still succeeded 47.2% to 62.0% of the time on two agents, against 4.6% to 28.0% for GCG.

The authors tested two defenses, a perplexity filter and query rephrasing. Under them AgentPoison's end-to-end success stayed between 47.2% and 62.0% on the driving and question-answering agents, against 4.6% to 28.0% for the GCG attack, which they put down to triggers that read as ordinary text. Triggers optimized on open embedding models also transferred to others, including OpenAI's ada-002, which is their answer to the attack's stated limitation, white-box access to the embedder. They argue that a published defense, which isolates each retrieved passage, "can hardly defend" the attack, but they do not test it.

high confidencebest source: independent researchobserved Jul 2024EvidenceSection 4
flag a problem with BI-FIND-2024-0041
BI-FIND-2024-0042

The attack assumes someone can add a few entries to an agent's store, and the paper tests no limit on who may write to an agent's memory.

The attack starts from an attacker who can add a few entries to the agent's store, which the authors match to memory hosted by a third-party retrieval service or an unverified knowledge base, such as Wikipedia pages anyone can edit. The paper tests no limit on who may write to an agent's memory and no limit on the actions the agent may then take, and it assumes the trigger reaches the user's query without saying how. We read that as putting the identity question at the write path: who may add entries an agent will later copy, and whether each entry's origin is recorded.

medium confidencebest source: independent researchobserved Jul 2024 – Oct 2026EvidenceThreat model
Also reported in +1 briefing
flag a problem with BI-FIND-2024-0042
02

Section by section

4

showing 4 of 4

[1]

Threat model: poisoning agent memory or RAG knowledge bases

Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley

AI trust

Chen, Xiang, Xiao, Song and Li argue agents that retrieve from unverified memory or RAG stores can be backdoored. The attacker is assumed to inject a few entries into the store and to hold white-box access to the embedder. Goals: a prescribed action when a trigger appears, normal behaviour otherwise. Claimed first such attack on RAG-based agents.

technical artifactfrom published text

[2]

Method: constrained trigger optimization

Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley

AI trust

Trigger tokens are found by gradient-guided beam search under four losses: uniqueness and compactness (map triggered queries to a distinct, tight region of embedding space), target-action likelihood, and coherence (keep the query readable, scored by a small surrogate LM such as gpt-2). No model training or fine-tuning is needed.

technical artifactfrom published text + figures

[3]

Results on three agents against four baselines

Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley

AI trust

Tested on Agent-Driver (23k memory entries), ReAct on StrategyQA (10k passages) and EHRAgent (memory enlarged to 700 by the authors), versus GCG, AutoDAN, CPA, BadChain. Reported averages: ASR-r 81.2%, ASR-a 59.4%, end-to-end ASR-t 62.6%, ACC drop 0.74%. Poison counts 20, 4 and 2 instances. ASR-t per cell in Table 1 spans 53.7 to 72.5.

technical artifactfrom published text

[4]

Transferability, ablation, perturbation and defenses

Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley

AI trust

Triggers optimised on one embedder transfer to others, including OpenAI ada-002, better within the same training family. One poisoned instance gives 62.0% ASR-r on average; one-token triggers 79.0%. Against perplexity filter and query rephrasing, ASR-t stays 47-62% versus 5-28% for GCG. Only those two defenses are tested; limitation: white-box embedder access.

technical artifactfrom published text + figures

Terms used

AgentPoison
A 2024 red-teaming attack that backdoors agents built on retrieval-augmented generation (RAG) and large language models (LLMs) by poisoning their memory with an optimized trigger.
AI agent
Software that uses an AI model to decide its own next steps and then acts through tools and APIs, rather than answering a single prompt. Because it acts, it needs an identity of its own.
ReAct agent loop
An agent design that alternates the model's written reasoning with tool actions and the observations they return.
Attack success rate
The share of attack attempts in a test that achieve the attacker's goal.
Greedy Coordinate Gradient (GCG)
An attack that searches for a string of odd-looking tokens to add to a prompt so a model does what the attacker wants, first built for jailbreaks.
RAG
Retrieval-augmented generation: an AI model is handed relevant documents at question time so it answers from your data instead of memory.

Read next

Was this briefing useful?

Share this briefing

Every finding, forecast and open question on this site has a permanent ID. If we reword one, its ID stays the same, so a citation keeps pointing to the same claim.

Follow us on LinkedInRSS feed

Working on an identity problem this research touches? Talk to Boston Identity