arXiv:2605.18930v1 [cs.CR] 18 May 2026
OEP: Poisoning Self-Evolving LLM Agents via Locally Correct but Non-Transferable Experiences
Kaixiang Wang Jiong Lou Zhaojiacheng Zhou Shanghai Jiao Tong University Shanghai, China [email protected]
Jie Li
Abstract Memory-augmented large language model (LLM) agents use iterative reflection and self-evolution to solve complex tasks, but these mechanisms introduce security risks. Existing agentic memory attacks require privileged access or explicit malicious content, making them detectable by advanced safety filters. This leaves a subtler attack surface underexplored: whether adversaries can induce agent to generate experiences that appear locally correct and semantically plausible yet induce harmful generalization during reflection. We find that reflective agents are vulnerable to such clean experiences, especially when paired with severe but plausible hypothetical consequences. Based on this observation, we introduce Obsessive Experience Poisoning (OEP), a low-privilege black-box attack requiring no direct control over the system prompt or memory database. OEP constructs adversarial clean edge-cases that combine locally correct solutions, non-transferable methods, and severe consequences, biasing reflection toward risk-averse rule formation. During memory consolidation, agents may over-trust self-generated reflections and distill localized experiences into high-priority but over-generalized rules, causing downstream failures. Evaluations across three domains show that OEP achieves ASR above 50% with GPT-4o agents, and outperforms existing attacks under LLM auditing defense.
1
Introduction
Driven by the rise of large language models (LLMs) [46, 17], autonomous agents have demonstrated strong capabilities in real-world applications such as autonomous driving, healthcare, and code generation [27, 20, 12]. Unlike standalone LLMs, agents are equipped with planning modules, external tools, and a memory bank [36, 9]. These critical components empower agents to solve complex problems by leveraging past experiences [45, 19]. Central to this paradigm is the long-term memory mechanism, which archives past execution trajectories as historical demonstrations [44, 23]. By retrieving relevant records, agents facilitate self-evolution through iterative reflection on both successful and erroneous outcomes [28]. This reflective process allows the agent to distill actionable expertise from prior experiences and refine its internal reasoning logic. Consequently, agents learn from past mistakes and generalize effective strategies, ultimately enhancing task proficiency and reliability in complex environments [33, 45]. In particular, recently emerging agent products, such as OpenClaw [7] and Claude Code [2], skillfully utilize memory banks and acquired skills to effectively plan and execute complex tasks. Despite the significant performance gains offered by memory-augmented self-evolution, these mechanisms introduce critical security vulnerabilities [25, 40]. Emerging threats, such as memory tampering [5], external memory poisoning [8], and backdoor injections [18], pose substantial risks to the integrity of long-term storage [39]. Such adversarial interventions can contaminate the memory bank, misleading the agent with compromised historical experiences. Consequently, the agent may derive Preprint.
Figure 1: Existing Memory Attacks VS. OEP.
flawed reflections from poisoned data, leading to deviated reasoning paths and erroneous task outcomes [43, 30]. This inherent fragility highlights a critical vulnerability within the memory-reflection loop, rendering self-evolution mechanisms susceptible to adversarial exploitation. Existing agentic memory attacks typically rely on malicious instructions [5], triggers, or tampered records [8] (as shown in Fig. 1(a)). This focus overlooks a more fundamental vulnerability of reflective agents: they may poison their own memory by over-generalizing from experiences that are locally correct and semantically plausible. Rather than injecting an explicit malicious rule, an adversary can shape the agent’s conversational history so that memory consolidation distills a non-transferable local method into a persistent high-priority rule. This raises our central question: can clean cases alone induce self-generated, harmful rules in memory-augmented agents? To answer this question, we introduce Obsessive Experience Poisoning (OEP), a low-privilege cleancase attack paradigm that targets reflective memory learning by leveraging clean edge-cases to induce biased experiences, which are then distilled into over-generalized rules and cause downstream task failures, as shown in Fig. 1(b). OEP is motivated by observations that agents can spontaneously misevolve through flawed memory reliance [26], and exploits three coupled failure modes: perspective confinement [13], asymmetric trust in self-generated reflections [21], and risk-sensitive utility skew [14]. Our framework follows a three-phase pipeline. First, we construct Clean Edge-Cases with locally correct but non-transferable solutions. Next, we introduce the Adversarial Consequence Triplet (ACT), pairing these edge-cases with severe but plausible hypothetical penalties. By skewing the perceived utility landscape, ACT narrows the hypothesis space during reflection, reducing abstraction uncertainty and greatly increasing the likelihood that the agent distills the attacker-intended biased rule. Finally, the crafted ACTs are submitted through user-level interactions and processed during reflective learning. Since the solutions are locally correct and the consequences remain semantically plausible, the agent may validate them while over-weighting risks. Consequently, it generalizes localized methods into persistent high-priority rules, causing failures on benign downstream tasks. We also analyze OEP’s attack mechanisms and empirically validate its effectiveness and robustness. Our contributions are as follows: • Obsessive Experience Poisoning: We propose an attack paradigm that couples clean-method poisoning with the induction of over-generalized rules during agent reflection. OEP exploits locally correct but non-transferable solutions embedded in plausible consequence narratives, causing agents to misinterpret localized successes as broadly applicable principles. • Adversarial Case Construction Framework: We design a systematic methodology that integrates clean edge-case generation with the synergistic injection of ACT, thereby cognitively hijacking the agent’s utility calculus. It steers reflection toward biased rule formation while preserving the local correctness and semantic plausibility of the input cases. • Empirical Robustness and Capability-Vulnerability Insight: Supported by mechanistic analysis and experiments, OEP achieves an ASR exceeding 50% across three diverse domains with GPT-4o agents, while achieving stronger robustness against LLM auditing defenses than baselines. The results reveal that more capable agents may also be more vulnerable under OEP. 2
2
Related Work
Self-Evolving Agents and Experience Learning. Recent advancements have transitioned LLM agents from static, prompt-driven responders to self-evolving systems capable of continuous improvement [11, 10]. Architectures such as Reflexion [28] and ExpeL [45] enable agents to accumulate trial-and-error trajectories, autonomously extracting reusable insights and rules into their episodic or semantic memory. Similarly, frameworks like Voyager [33] and EvolveR [35] construct expansive skill libraries to guide future decision-making. While these mechanisms significantly enhance generalization, recent empirical studies highlight a critical vulnerability: the experience-following behavior [38]. Agents exhibit a strong inductive bias to blindly replicate past methodologies when faced with semantically similar inputs. This property, originally designed for efficiency, inadvertently facilitates error propagation and forms the theoretical foundation of our attack surface. Adversarial Attacks on Agent Memory. Exploiting memory modules has rapidly emerged as a primary attack vector against autonomous agents [40]. AgentPoison [5] demonstrated backdoor attacks by optimizing triggers to retrieve malicious demonstrations from RAG knowledge bases. Advancing beyond static databases, MINJA [8] and Zombie Agents [39] proposed query-only interactions to inject harmful instructions or coerce the agent into rewriting its own memory for persistent control. Closest to our context, MemoryGraft [29] leverages semantic imitation heuristics to plant unsafe operational patterns (e.g., skipping verifications) into long-term memory. Despite their varying mechanisms, these mainstream attacks share a fundamental limitation: the injected payloads inherently contain explicit malicious intent, unsafe procedures, or verifiable factual errors. Consequently, they remain susceptible to rigorous content filtering, anomaly detection (e.g., AMemGuard) [34], or LLM-as-a-Judge sanitization [1]. Our work targets a distinct attack surface: the reasoning and memory update process of LLM agents. Inspired by clean-label poisoning in traditional deep learning [24], OEP shows that seemingly correct experiences in agent memory can still induce harmful behavioral shifts. Unlike attacks that alter cognitive tone [47] or inject toxic rationales [37], OEP preserves problem-solution correctness while adding plausible consequences, allowing locally correct content to evade factuality- or toxicity-based defenses and induce unsafe generalization through biased utility signals.
3
Threat Model
We formalize the OEP threat model by detailing the attacker’s capabilities, victim system assumptions, and adversarial objectives. Attacker Capabilities. We assume a low-privilege, black-box attacker with user-level access to the target agent. The attacker cannot modify the system prompt, access model parameters, directly edit the memory database, or tamper with backend tools. Their capability is limited to submitting crafted ACTs based on clean edge-cases, denoted as eadv , that may enter the agent’s episodic history through its standard memory-consolidation pipeline. These experiences feature factually correct but highly idiosyncratic problem–solution pairs. Victim System Assumptions. The target agent employs a reflection-based memory consolidation mechanism. Let Mt be the shared semantic memory at step t and Ht be the episodic history. An epistemic validator V assesses the factual and semantic validity of each input. Because eadv is valid in the current context, it bypasses this validator and remains in the filtered history Ĥt = E(Ht ), where E denotes the history-level filtering operator. A reflection function R then extracts global rules to update the memory: Mt+1 = Mt ∪ R(Ĥt ). (1) We assume this updated Mt+1 acts as a global prior causally influencing future independent sessions. Attacker Objectives. The goal is to exploit R to distill a localized edge-case into a persistent system-level over-generalized rule robs ∈ Mt+1 . The objectives span two dimensions: • Compromising Integrity: Induce reasoning failures on normal downstream tasks Dtask . Let L be the task loss and Fθ the agent generation process. The attacker maximizes expected error 3
Figure 2: Overall framework and pipeline of OEP. while evading detection: max E(x,y)∼Dtask [L(Fθ (x, Mpoisoned ), y)] eadv
s.t.
E(eadv ) = True,
(2)
where Mpoisoned contains the biased rule robs . • Compromising Availability (Denial-of-Wallet): Exhaust computational or API resources (e.g., redundant tool invocations). For a cost function C(·), the objective is to abnormally inflate resource consumption beyond a normal threshold τc : Ex∼Dtask [C(Fθ (x, Mpoisoned ))] ≫ τc .
4
(3)
Method
The design of the OEP framework draws direct inspiration from well-documented human cognitive vulnerabilities—specifically, the availability heuristic and negativity bias. In human psychology, rare but highly salient events often skew general probability judgments, and the prospect of severe loss disproportionately drives decision-making [32, 16]. Crucially, recent empirical studies reveal that self-evolving LLM agents can exhibit analogous failure modes, spontaneously “misevolving” into misaligned states due to an unguided over-reliance on past memories and reward-hacking behaviors [26]. Leveraging these dual insights from human psychology and agentic vulnerabilities, we engineer an adversarial structure that actively and cognitively hijacks the reflection and induction mechanisms of self-evolving agents. To operationalize this attack, OEP employs a systematic, three-phase pipeline (as shown in Fig. 2): First, we construct Clean Edge-Cases (Phase 1) that provide correct but non-transferable methods, establishing an availability baseline. Next, we couple these cases with an Adversarial Consequence Triplet (Phase 2), introducing severe hypothetical penalties to weaponize the agent’s safety-aligned loss aversion. Finally, through User-Level Injection (Phase 3), the agent actively processes these crafted inputs. Bounded by its confined perspective, the agent validates the local correctness and over-prioritizes the negative consequences, erroneously distilling the non-transferable method into a high-priority rule. 4.1
Clean Edge-Case Construction
To systematically construct clean edge-cases, we define a generation process governed by two strict constraints. Let Dtask denote the standard task distribution. The attacker first specifies a non-standard method me , and then samples a boundary task te from the tail region of Dtask , where atypical conditions make me locally applicable. Based on this task, the attacker derives a corresponding solution se instantiated by me . First, the pair (te , se ) must satisfy local correctness under an objective oracle O: O(te , se ) = True. 4
(4)
This constraint ensures that the constructed case contains no factual or logical error in its original context, preserving its benign appearance during validation. Second, the method me must satisfy global non-transferability. Defining S(t, me ) ∈ {0, 1} as the success indicator of applying me to task t, we require its expected success rate on normal tasks to be bounded by: Et∼Dtask [S(t, me )] < ϵ. (5) This constraint ensures that although me is valid for the constructed edge case, it remains unreliable when transferred to ordinary tasks from the broader task distribution. Practically, LLMs are prompted to generate domain-specific boundary conditions and candidate solutions, followed by automated empirical filtering. We retain only candidates that are locally valid while exhibiting poor transferability on standard task instances. 4.2
Adversarial Consequence Triplet (ACT)
Intuitively, injecting naive, technically correct edge-case solutions (se ) is insufficient to induce the targeted obsessive experience. During the reflection phase, unconstrained injection introduces high abstraction uncertainty. It is highly improbable that an agent will spontaneously abstract the specific biased rule robs intended by the attacker from merely observing isolated local successes. Formally, we model the reflection module as selecting a rule r from a vast hypothesis space R based on its perceived validity V (r | se ). The attacker’s objective is to solve the optimization bottleneck of maximizing the conditional distillation probability: exp(V (robs | se )) P (robs | se ) = P . (6) r∈R exp(V (r | se )) However, without explicit constraints, numerous benign generalizations share similar validity scores. This makes the extraction and distillation of the exact non-transferable experience highly stochastic, yielding P (robs | se ) ≪ 1. To bypass this abstraction uncertainty and bias rule formation toward the non-transferable solution, we pivot to cognitive exploitation. Modern safety-aligned LLMs inherently exhibit high loss aversion [14], disproportionately prioritizing the avoidance of severe harm. We exploit this psychological trait by introducing the ACT to manipulate the task’s reward landscape. For a given edge-case task te and its non-standard solution se , attacker constructs an adversarial ACT eadv = (te , se , cadv ). Here, te details the problem context, and se serves as the positive reinforcement baseline. The pivotal component is the adversarial consequence cadv . Rather than merely validating the correct solution, cadv articulates an extreme, yet domain-plausible, hypothetical catastrophe if se is not applied (e.g., a fatal kernel panic or critical misdiagnosis). We frame this manipulation using Expected Utility Theory. Let the expected utility of executing any method s be defined by its probability of success and failure: E[U (s | te )] = P (succ | s)U (s | te ) + P (fail | s)U (¬s | te ).
(7)
ACT artificially manipulates this calculus. While U (se | te ) denotes the baseline positive utility, cadv introduces a large negative utility for standard method applications (mstd ), inducing an asymmetric risk profile: |U (¬se | te )| ≫ U (se | te ) > 0. (8) When the reflection module R evaluates this episodic memory, the large magnitude of the hypothetical penalty dominates the objective function. To successfully override the agent’s pre-trained global priors, the expected utility of the edge-case solution must satisfy a strict decision margin τu : E[U (se | te )] > E[U (mstd | te )] + τu .
(9)
Because the large penalty in ACT drives E[U (mstd | te )] towards an extreme negative magnitude, this threshold condition is easily met, greatly reducing abstraction uncertainty. Consequently, the selected method becomes fixated on the edge-case solution to maximize the expected utility under this skewed perception: s∗ (te ) = arg max E[U (s | te )] ≈ se . (10) s
By weaponizing the agent’s inherent safety alignment, ACT solves the optimization constraint, inducing a localized, non-transferable method to crystallize into a high-priority system-level rule. 5
Table 1: Overall performance of evaluated methods across three diverse domains under three agent frameworks. Framework Agent GPT -4o
GPT -5.4
4.3
Lang Chain Open Claw
Method No Mem S-Evo OEP No Mem S-Evo OEP No Mem S-Evo OEP
ACC 82.57 91.43 40.29 90.57 92.86 38.57 96.00 98.86 28.57
Math Token Latency 204 3.14 301 6.94 397 10.92 196 3.38 315 6.33 382 9.28 198 9.71 285 15.75 473 22.43
ACC 84.29 87.14 42.86 83.71 85.71 44.86 91.71 93.14 69.43
Med Token Latency 377 7.67 438 10.85 557 15.01 365 7.38 414 11.23 532 15.75 351 26.47 495 31.43 672 45.32
ACC 93.86 98.25 86.84 92.98 99.12 87.72 98.25 100.0 96.49
Steps 1.11 1.18 2.87 1.14 1.16 2.83 1.16 1.31 3.08
Tool Token 174 225 330 169 246 393 112 181 334
Latency 3.60 5.25 7.50 3.49 6.11 7.94 13.79 16.40 24.45
Injection and Over-generalization
To operationalize the attack without backend privileges, we submit a curated sequence of adversarial triplets eadv through user-level interactions. Acting through normal user-level inputs, these inputs are then processed by the agent’s built-in reflection and memory-consolidation mechanism, which autonomously analyzes episodic records and abstracts reusable principles for memory integration. Prior to consolidation, the episodic history containing eadv = (te , se , cadv ) is examined by the agent’s internal epistemic filter E. Since the solution se is locally correct and the consequence cadv remains semantically and logically coherent within the constructed context, the case can bypass validation. Formally, let Vlogic denote the logical validation of the solution and Vsemantic denote the semantic coherence check of the consequence. The filter yields a positive validation: E(eadv ) = Vlogic (se | te ) ∧ Vsemantic (cadv | te ) = True.
(11)
Upon processing this verified episodic observation, the agent’s reflection module R distills it into a global semantic rule robs by exploiting the over-inductive bias of LLMs. Driven by both the positive reinforcement from solving the edge case and the severe negative constraint in cadv , the localized success of se is generalized into an imperative: For tasks resembling te , always apply se . Triggered by loss aversion, the agent assigns a high priority weight w(robs ) to this rule, proportional to the magnitude of the severe penalty: w(robs ) ∝ |U (¬se | te )| .
(12)
Consequently, robs crystallizes into an over-prioritized heuristic that causes systematic downstream failures. When presented with a benign task tnormal ∼ Dtask , its semantic overlap with te triggers the retrieval of robs . Under the compromised utility model, the agent prioritizes avoiding the imagined severe penalty over standard procedures, erroneously applying the non-transferable method se where it is invalid. Since Et∼Dtask [S(t, me )] < ϵ, the agent’s performance degrades persistently, turning self-evolution into self-sabotage.
5
Mechanistic Analysis
To elucidate OEP’s efficacy, we identify three interacting failure modes in the memory-reflection loop of self-evolving agents (see Appendix E for details). • Provenance-Weighted Trust: Agents often scrutinize external prompts more strictly than rules distilled by their own reflections [13]. By inducing the agent to formulate the adversarial regularity itself, OEP can weaken external guardrails through a provenance shift. • Perspective Confinement: Bounded by the injected short-term context, the agent can suffer from observational selection bias [21]. It may overestimate the empirical support of the edge-case method and mistake localized success for a broadly valid rule. • Risk-Sensitive Rule Induction: LLM agents may assign high weight to plausible severe consequences. By introducing severe hypothetical penalties, ACT increases the perceived cost of deviating from the edge-case method [14]. This risk skew can dominate ordinary task utility, raising the priority of the flawed, non-transferable generalization. 6
Table 2: Performance of OEP using Different Model Backbones