Paper reveals context-compaction laundering attack can forge user authorization
Start here
Pixee researcher Arshan Dabirsiaghi shows in the paper "Compaction Laundering": an attacker inserts a fake user's "previously approved" statement into a web page's installation guide, and after one round of context compaction the coding agent runs the installation steps it previously refused. The mechanism is that some compaction implementations serialize messages into concatenated text without escaping role tags, allowing external content to impersonate user messages; the summary cannot recover the true origin from the lost structure, and so writes the forged approval into the user constraints. The paper's E10 component controlled experiment (15 runs per implementation) shows differences in the behavior of implementations such as pi and open.
Generated by AI from reports · Updated 2026-10-31
Progress timeline
- WeChat · Oxo SecurityThe installation script the agent had just refused—how did it become "user approved" after memory compaction?
Pixee researcher Arshan Dabirsiaghi shows in the paper "Compaction Laundering" that after an attacker inserts a fake user's "previously approved" statement into a web page installation guide, a coding agent runs previously refused installation steps after a single context compaction. The mechanism is that some compaction implementations serialize messages into concatenated text without escaping role tags, allowing external content to impersonate user messages; the summary cannot recover the true source from the lost structure, writing the forged approval into the user constraints. The paper's E10 component comparison (15 runs per implementation) shows that pi, opencode, and Aider each attributed the forged approval to user instructions in 15 runs, OpenHands in 14, and Cline in 13, while Codex, Gemini CLI, Qwen Code, and Continue, which preserve message roles, were all 0; the authors emphasize that this is only a component-level comparison, not a product compromise rate.