When Experience Becomes a Backdoor: Poisoning Self-Evolving LLM Agents via Failure-Aware Task Optimization

Minhua Lin, Suhang Wang and colleagues at Penn State, with co-authors at Microsoft, show that an attacker who can only submit tasks to a self-evolving agent can make it write a backdoor into its own skills.
Ask this paper
Threat model. The attacker controls neither skill induction nor execution. It can only inject poisoned evolution tasks, and the agent's trusted evolver then writes the malicious rule into a skill.
Stage diagnosis. BadEvolve traces each failed attack to one of four stages: Induction, Activation, Following or Effect. It then updates the poisoned task to fix that stage.
Stability. Rollback keeps earlier progress, and a failure memory stops the attacker from repeating updates that did not work.
Results. Across self-evolution frameworks, benchmarks and backbone models, BadEvolve reports average attack success of 79.6% and 84.6% in its main settings, against 37.6% for TBA and 28.8% for TextGrad-Poison, while the victim keeps its utility.
Abstract
Large language model (LLM) agents increasingly improve themselves through self-evolution, distilling execution experience into persistent, reusable skills. However, this persistence creates a new attack surface: malicious rules implanted into skills can compromise subsequent agent behavior. Existing skill backdoor attacks typically assume direct manipulation of the victim's skills, which is impractical when skills are constructed internally by a trusted evolver. In this paper, we study a novel problem of task-level backdoor attacks, where the attacker can only inject poisoned evolution tasks, inducing the agent to implant backdoors into its own skills. Since the attacker controls neither skill induction nor downstream execution, a natural approach is to iteratively optimize poisoned tasks based on attack success. However, our preliminary analysis reveals two key challenges: (i) failures at different stages of skill evolution and downstream execution can produce indistinguishable outcomes, providing little guidance for targeted poisoned-task updates; and (ii) unsuccessful updates may undermine earlier progress, while simply discarding them may lead to repeated ineffective updates. To address these challenges, we propose BadEvolve, a failure-aware task-poisoning framework against self-evolving LLM agents. BadEvolve diagnoses attack failures across four stages, i.e., Induction, Activation, Following, and Effect, and directs updates toward the failing stage. It further employs rollback to preserve earlier progress and failure memory to avoid repeating ineffective updates. Extensive experiments across diverse self-evolution frameworks, benchmarks, and backbone LLMs demonstrate the effectiveness of BadEvolve. Our code is available at https://github.com/ventr1c/BadEvolve.