Protecting LLM agent long-term memory from poisoning: tamper-evident, source-bound permissions and machine-checkable guaranteesSecuring LLM-Agent Long-Term Memory Against Poisoning: Non-Malleable, Origin-Bound Authority with Machine-Checked Guarantees
TMA-NM resists memory poisoning through write-time provenance binding; across the eight-model summary, direct and laundered ASR are both 0%, and legitimate utility is 100% (Table I).
The adversary controls untrusted external content that the agent may store, cannot forge origin or scope, cannot break cryptography, and does not control the user authorization channel. The goal is to prevent untrusted external items from triggering payments, setting changes, or data exfiltration without at least two independent trusted subjects corroborating, or without fresh user authorization bound to that action. Guarantees are conditional on A1: the monitor labels provenance by authenticated channel rather than content.
- Persistent memory lets untrusted content written once drive payments, setting changes, or data exfiltration in later sessions. The authors state that defenses based on content or derivation edges can be laundered by self-summarization, trusted tool echo, and fabricated corroboration.
- TMA-NM binds action permissions by channel at write time; derived content inherits the untrusted level. Consequential actions are only released with corroboration from at least two independent trusted parties, or under a one-time user authorization bound to that action. The separation results on a bounded TLA+ model are checked by TLC.
- In the eight-model summary, TMA-NM directly and for laundering has an ASR of 0% and a legitimate utility of 100% (Table I). In the trigger-style study, consequential attacks are 0/4032, with utility 95.9%, the same as no defense. No content judge threshold simultaneously achieves 0% ASR and 100% utility (Table VI).
- The authors state that answer bias is only mitigated, guarantees depend on correct provenance labeling and genuinely independent corroboration, and unbounded deductive proofs and value-level capability tokens are left for future work. Experiments include eight models, five defense classes, multi-round loops, and the Mem0 backend; threshold and other sub-studies use three models.
- Evaluated models
- gpt-5-chatgpt-4o-miniclaude-opus-4.1claude-sonnet-4.5gemini-2.5-flashllama-4-maverickdeepseek-chatqwen3-235b
- Benchmarks
- MEM-INV-Bench
- Metrics
- consequential-action ASRlegit-utilityuncorr-autotask utilityper-decision latency
The paper proposes TMA-NM, a poisoning defense mechanism for LLM agent long-term memory that binds memory action permissions to their source at write time, reducing attack success rates for direct attacks and three types of laundering attacks to 0% across eight frontier models, with legitimate utility on par with a defense-free agent. The authors define laundering as an attacker erasing a memory's untrusted provenance through three channels: the agent's own summarization, trusted tool echo, and forged corroboration, and use a machine-checked separation theorem in TLA+ to prove that content- and lineage-based defenses are unreliable under such attacks. On MEM-INV-Bench, content trust scores are broken by laundering attacks 68% of the time, single-session capability IFC still permits 84% of direct attacks, and lineage defenses are broken 47% by summarization and echo. TMA-NM's action gate is a deterministic check, taking about 1.3 microseconds per decision, requiring no additional model calls; the authors also note it does not block non-conclusive answer bias, and an unbounded proof remains incomplete.
Why it was selectedThe paper uses a machine-checked separation theorem and cross-model benchmarks to show that content- and lineage-based memory defenses can be bypassed by laundering attacks, while a provenance-bound permission construction maintains zero attack success across eight frontier models.
Related events and news
0 events · 1 news mentions
News that mentions this paper
- Adversa AIcites the paper's id or link2026 年 7 月 Agentic AI 安全资源盘点:Agent Zero Trust 与 27 项资源
Securing LLM-Agent Long-Term Memory Against Poisoning: Non-Malleable, Origin-Bound Authority with Machine-Checked Guarantees
Paper analysis
What problem does this paper attempt to solve?
Untrusted memory can obtain action permissions through three laundering channels; TMA-NM instead binds source at write time.
Untrusted content in long-term memory can drive payments, setting changes, or data exfiltration in later sessions.
- Scenario: The authors state that persistent memory is already a default capability of deployed LLM agents; cross-session recall turns content written earlier into later actions. Existing work reports injection success rates up to about 99.8%.
- Existing limitations: The authors state that detection checks whether content is malicious, but poisoned memory is benign before activation, and adaptive adversaries can evade content checks at use time. MemLineage tracks provenance and blocks sensitive actions, but recomputes verdicts at distribution time and provides no path for legitimate untrusted information to act.
- Observation: The authors state that both the content and derivation edges are malleable. Laundering refers to using behavior-preserving transformations to erase untrusted provenance. The three channels are self-summarization (L-a), trusted tool echo (L-b), and fabricated corroboration (L-c).
- Proposal: Formalizes the malleability of write-retrieve-act, gives separation results T1–T3 on a bounded model, and constructs TMA-NM with the benchmark MEM-INV-Bench.
- Threat model:
- Goal: Untrusted external items must not cause consequential actions without independent trusted corroboration, or without fresh user authorization bound to that action. Non-consequential answers may be presented with provenance; answer bias is mitigated rather than eliminated.
- Capabilities: The adversary controls untrusted external content that may be stored, such as documents, web pages, tool outputs, or other user messages. Cannot forge origin or scope, cannot break cryptography, and does not control the user authorization channel.
- System: The pipeline is write → retrieve → act. origin takes user, trusted tool, agent, untrusted external; act class takes none, inform, act. Consequential actions include tool invocation, payments, setting changes, and data exfiltration.
- Assumptions: A monitor sets origin and scope at write time. A1 requires labels to come from authenticated channels rather than content. The authors state that all guarantees are conditional on A1. Attack classes are sleeper, control-flow, direct, data-exfiltration; memory shared across agents is out of scope.
What related research exists?
The authors compare against poisoning attacks, provenance, and single-session IFC, and position this work as non-malleable provenance authority.
The authors position by attack, structural defense, and classic information flow; the comparison falls on five defense categories and MEM-INV-Bench.
- Memory poisoning: AgentPoison and agent backdoor work implant backdoors by poisoning memory or knowledge bases; sleeper poisoning can reappear across unrelated sessions, control-flow attacks hijack tool selection, PoisonedRAG and MINJA correspond to retrieval poisoning and query-only injection, respectively. MemMorph, MemoryGraft, Trojan Hippo, and conversational Trojan disguise technical facts, implant so-called successful experiences, place dormant exfiltration payloads with a single untrusted tool call, or install triggerable backdoors through ordinary conversation, respectively. The authors classify these into this paper's attack category and reproduce them in Section VI.
- Memory-side defenses: MemLineage saves origin-derived labels across sessions; the authors claim its derivation edges can be laundered, with no supporting evidence of gating improvement and no machine check on the nature of that memory's permissions. CaMeL and Fides use dynamic IFC to guard single-session prompt-to-action paths; the authors claim they assume memory is not poisoned and lack non-malleability. SuperLocalMemory does Bayesian content trust scoring at write time; NeuroTaint is offline semantic taint auditing; TrustRAG-style retrieval-time filtering is classified by the authors as content decisions that can be laundered, and they call it a best-effort pre-filter rather than a guarantee.
- Control, protocols, and surveys: Mandatory access control frameworks are spatial and single-session, with state reset each round; the authors claim theirs is a temporal complement on persistent memory. The MCP formalization framework is unimplemented, targets a single trace, and places long-term memory out of scope. The LTM security survey calls for anchoring provenance at write and storage time; the authors claim to implement this. Selection Integrity argues impossibility of lineage-style defenses for graph selection channels; the authors claim that channel is orthogonal to paraphrase, tool echo, and Sybil channels. The Mesh Memory Protocol distinguishes echo from independent corroboration at the protocol level; the authors claim it does not prove Sybil resistance.
- Classical integrity: The authors write Biba's integrity, Clark–Wilson's separation of duties, Denning's lattice information flow, Myers and Liskov's label model, and Cecchetti et al.'s nonmalleable IFC as conceptual sources of the construction. Douceur's Sybil attack corresponds to the independent principals required by the elevation gate. Web provenance is used to contrast the decision log; the authors claim the log records allow/deny, not launderable data lineage.
Baseline methods and benchmark: none, trust score (example is SuperLocalMemory; the instance in the cross-model study is an LLM judge run on the tested model, i.e., prob detect), lineage (MemLineage-style), capability ifc (CaMeL/Fides-style), and TMA-NM. The benchmark is MEM-INV-Bench.
The authors claim that source annotation and cross-session enforcement already exist in systems, and the novelty is the separation, non-malleable construction, and benchmark; and claim that, to their knowledge, this is the first instance of applying nonmalleable IFC to LLM agent memory.
How does the paper address this problem?
TMA-NM binds permissions by channel at write time, is not extensibly propagated, and is elevated via independent corroboration or one-time authorization.
TMA-NM (Tamper-evident Memory Authority, Non-Malleable) binds action authority to provenance at write time, so that none of the three laundering transformations can lower that label, and uses Sybil-resistant corroboration to preserve legitimate elevation. In Fig. 1, the monitor sits between write, retrieve, and act.
Labels and malleability
- A memory item is (content, origin, scope, twrite, act class). The integrity order is untrusted ⊏ agent ⊏ trusted. Defense D maps each item to a label on this order.
- The transformation set A contains self-summarization L-a, trusted tool echo L-b, and fabricated corroboration L-c, without genuine trusted consent or user consent.
- Invariant Sec: an untrusted-provenance item must not authorize a consequential action unless elevated by at least k independent trusted subjects, or accompanied by fresh user authorization bound to that action.
- Malleable means there exists an item x and transformation τ such that effective authority rises. Non-malleable means for any x and τ,
D(\tau(x)) \sqsubseteq D(x), i.e., transformations cannot raise effective authority.
Four mechanisms
- M1 Write-time binding: At write time, set act class = f(origin). untrusted maps to none, agent maps to inform, trusted tool or user maps to act. The monitor records origin, which the adversary cannot forge.
- M2 Non-malleable propagation: Authority is bound to origin, not content or derivation edges. Self-summarization notes, or trusted tool outputs that consume untrusted inputs, inherit the maximum untrusted level, keeping act=none. Opaque tools do not infer black-box internal data flow; instead, at the call boundary, propagation follows the maximum untrusted level of parameters and passed retrieved items. Output is treated as trusted only when the tool is on the provenance authority allowlist and all bound inputs are trusted. The authors state this is an over-approximation that can raise taint but cannot silently lower it.
- M3 Corroboration elevation: A safety-relevant value driven by untrusted items is allowed only if at least 2 independent trusted subjects (different registries or tools, not duplicate or echoed content) permit that value, or a user authorization bound to that action is consumed. Duplicate untrusted items do not count, elevation is monotonic, and an item cannot corroborate itself. User authorization is a one-time token covering (tool, value v, amount, nonce, timestamp); the dispatched action must match that tuple and the token must be unused; changing v invalidates the authorization.
- M4 Verdict log: Writes, elevations, and allow/deny are appended to a hash chain. Each append is one hash of the previous head, O(1), with no additional model calls. Storage grows linearly with the number of verdicts; the authors state that periodic Merkle checkpoints can compress entries before the checkpoint.
Decision at action time
Algorithm 1 first takes the safety-relevant value v of the action, then collects the retrieved untrusted items U driving v. If U is empty, ALLOW. Otherwise, if at least 2 independent trusted subjects permit v, elevate those items and ALLOW; otherwise, if there is fresh user authorization bound to that action, consume it and ALLOW; otherwise, DENY.
The structural rationale the authors give: L-a fails because notes inherit the maximum untrusted level of provenance; L-b fails because tool outputs with untrusted inputs are conditionally tainted; L-c fails because only independent trusted subjects count. Sleeper and disguise are subsumed under the same rule because authority is bound to origin, not timing or wording. The authors state that a fully compromised trusted tool is the main remaining risk. Non-consequential answer bias is out of scope and presented with provenance.
Separation on a bounded model
- The pipeline is modeled in TLA+ and checked by TLC. CONSTANT selects the action gate rule. The following statements are for the bounded model M: Slots=3, sessions≤2, k=2.
- T1: If the verdict is a function of content, or of provenance edges derivable from content, then it is malleable per Definition 1, and there exists a reachable state violating Sec. The TLC witness trace is write-untrusted → paraphrase → act. T2: With write-time provenance binding disabled, Sec is violated in some reachable state, so write-time binding is necessary within that model. T3: A gate that binds authority to origin and elevates only via at least k independent trusted subjects or fresh action-bound user authorization satisfies Sec on all 3,270 reachable states and is non-malleable.
- On the implementation side there are additional exhaustive checks: Action Integrity (120 configs), Elevation Soundness (64 corroborator sets), and end-to-end safety. The paper does not give failure counts.
- The inductive invariant includes type conditions and Security. The authors report that TLC checked single-step preservation from all states satisfying the invariant, plus initial states; the independence of slot count and session count is a handwritten argument. The authors state that what results is a machine-checked inductive invariant, not a fully mechanized unbounded proof.
What experiments did the paper conduct?
In the eight-model summary, TMA-NM has 0% ASR for direct and laundering attacks and 100% legitimate utility (Table I).
Experimental setup
- Models: gpt-5-chat, gpt-4o-mini, claude-opus-4.1, claude-sonnet-4.5, gemini-2.5-flash, llama-4-maverick, deepseek-chat, qwen3-235b, from six vendors. The authors state this includes the strong-safety model claude-opus-4.1. Models with empty response rates above 5% were excluded; two unnamed models were replaced during development, and the final eight models had 0% empty responses.
- Benchmark: MEM-INV-Bench, 12 domains, tool types: pay, wire, purchase, setting-change, data-send. Attack scenarios cover sleeper, control-flow, data-exfiltration; each attack has benign, static, adaptive, whitebox. There are also legitimate elevation scenarios requiring trusted corroboration before acting.
- Defenses: none, trust score, lineage, capability ifc, tma nm. In the cross-model study, the content-class instance is called prob detect; TMA-NM is also written as temporal auth in auto-generated tables. Appendix A: none allows all actions; trust score authorizes when any supporting item looks benign or at least two items assert the value; lineage authorizes when there is no live derivation edge to an untrusted ancestor, falling back to trusted when provenance is unclear, and is given edges without extraction errors; capability ifc assumes long-term memory is not poisoned. prob detect runs on the tested model, not an external stub.
- Metrics: consequential action ASR, legit-utility, uncorr-auto, task utility, per-decision latency. Wilson 95% CI and permutation tests are reported. Smaller sub-studies use reduced panels: Mem0 uses six models; sensitivity, threshold, independence, and lineage policies use three models, not specified in the paper.
- Review: The main study has no separate external judge model. In the sensitivity experiment, a content judge scores memory items 0–100 and scans interception threshold τ. The paper does not state a unified interception threshold for the main study.
Main results
The table below is Appendix B Table XI, no-defense consequential ASR (%), n=24 per cell. TMA-NM is 0/24 in every cell. Per-model channel counts for other defenses are not listed in the main text. The paper calls the five-category summary in Table I the primary result.
Swipe horizontally to read the table
Model direct summary echo corroboration TMA-NM gpt-5-chat 88 58 67 67 0 gpt-4o-mini 67 67 83 33 0 claude-opus-4.1 67 67 67 67 0 claude-sonnet-4.5 67 67 67 67 0 gemini-2.5-flash 100 100 67 67 0 llama-4-maverick 96 67 62 58 0 deepseek-chat 100 79 67 67 0 qwen3-235b 92 88 67 67 0 - The authors state that among the five categories, only TMA-NM achieves 0% on both direct and laundering attacks, with 100% legit-utility (Table I). Same table: none has direct-ASR 84, laund.-ASR 68, uncorr-auto 100; trust score has 0, 68, 100; lineage has 0, 47, 0; capability ifc has 84, 68, 100. laund.-ASR is the mean of L-a/b/c. Channel breakdown in Figure 5: none and capability ifc are 84/74/68/61, trust score is 0/74/68/61, lineage is 0/74/68/0, TMA-NM is 0/0/0/0.
- The authors state legit-utility is the same as no defense, to rule out that "rejecting everything also yields 0% ASR." uncorr-auto at 0% means unverified untrusted-source actions require one-time confirmation; none, trust score, and capability ifc are 100% (Table I).
- The authors report all TMA-NM ASR gaps vs. baselines have p < 5×10^{-5} (two-sided permutation test, 20,000 runs). TMA-NM is 0/192 on direct, summary, echo, and corroboration, Wilson 95% CI [0, 2.0]%. Fig. 2 caption states TMA-NM is 0% on direct and laundering attacks and maintains 100% legit-utility; the main text does not give the CI ticks in the figure item by item.
Trigger styles, ablations, and persistence
- Table II (eight-model summary): none has static/adaptive/whitebox/all ASR 43.8%, 27.6%, 22.2%, 31.2%, utility 95.9%; prob detect has 6.5%, 12.2%, 12.9%, 10.6%, utility 93.0%; lineage has 24.4%, 9.3%, 0.0%, 11.2%, utility 95.9%; temporal auth has 0.0% for all, total 0/4032, CI [0.0, 0.1]%, utility 95.9%. The authors report each gap p < 1/20,000. Table III: temporal auth is 0/0/0 across all eight models. The authors state prob detect on gpt-5-chat flags no items, ASR still 52/38/22, utility 96, same as none.
- Table IV (eight-model means): none and without origin binding are both 44/28/22, utility 96; full TMA-NM and without verdict log are both 0/0/0, utility 96; without elevation is still 0/0/0, utility 77. The authors state M1 carries safety, M3 carries utility, M4 provides only auditability. Fig. 3 x-axis includes −M2; Table IV has no separate row for removing propagation; bar heights in the figure are not given in the main text.
- The main text states TMA-NM is 0% for intervention session counts N = 0, 1, 2, 4, 8; no defense is 51–61%. The authors state dormancy cannot bypass write-time binding.
External pipelines, multi-turn, and Mem0
- Table V (eight models, all trigger styles combined): total ASR across four pipelines, none 38.2%, prob detect 12.0%, lineage 19.6%, TMA-NM 0.0% (0/1152). Benign task utility is 264/384 for both. Trojan Hippo row: none 78, prob detect 44, lineage 78, TMA-NM 0. The main text also writes lineage 78.5%, content judge 43.8%; the table is authoritative.
- Multi-turn tool loop (eight models, n=128 per defense): no defense induces taking poisoned values and acting 61.7% of the time, TMA-NM 0%. The authors state the monitor propagates origin by value across turns.
- Mem0 with local embeddings and Qdrant (six models, n=96 per defense): no defense 50.0%, CI [40.2, 59.8]; TMA-NM 0%, CI [0, 3.8]; permutation test p = 5×10^{-5}. Legitimate actions are 95/96 (99.0%) for both. The authors state that single joint failure was a model formatting failure, not a TMA-NM interception; corroboration counts come from monitor records, not re-parsed from retrieved text.
Thresholds, default policies, and independence
- Table VI (3 models, n=81 attacks / 27 legitimate): τ=0 gives laundering ASR 0.0%, utility 0.0%; τ=5 gives 3.7% and 33.3%; τ=75 gives 25.9% and 100.0%; τ=100 gives 55.6% and 100.0%. The authors state no τ simultaneously achieves 0% ASR and 100% utility; the best point with ASR≤5% has utility only 33.3%. TMA-NM row is 0.0% and 100.0%.
- Table VIII (3 models): lineage default-allow has summary/echo ASR 78/74, both legitimate utilities 100; default-deny reduces summary to 0, echo remains 74, inconclusive legitimate utility 0. TMA-NM has ASR 0 across channels, both legitimate utilities 100. The authors state changing only the default policy cannot simultaneously give 0% ASR and 100% utility.
- Table VII: attack ASR for any k is 0% (0/18). For k=2, auto-authorization rate is 0 for m=1 and 100 for m≥2; for k=1 it is 100 for all m. Table X (3 models): k=2 single compromise is 0; two independent compromises, naive and domain-aware are both 67; shared-domain compromise naive is 67, domain-aware is 0; k=3 two independent compromises is 0.
Other ablations and analyses
- Action gate latency is 1.3 µs/decision; content detection judge call is about 2,000 ms. The authors state this is about six orders of magnitude cheaper and does not call the model additionally.
- The authors state answer bias remains high under all defenses including TMA-NM; the paper does not give that proportion.
- A whitebox adversary forges plausible-sounding corroboration in untrusted content. The authors state TMA-NM counts by origin, so such forgery does not count as corroboration; prob detect's whitebox aggregate ASR is 12.9% (Table II).
- On claude-sonnet-4.5, prob detect utility is 81, none and temporal auth are 96 (Table III).
- The paper states all runs report costs; the main text does not give monetary cost figures.
- Full raw counts for five defenses × four channels × eight models are in the release; the main text does not list them.
What are some points that can be further explored?
The authors state that answer bias is not eliminated; trust is shifted to annotation and corroboration independence, and an unbounded proof is left for future work.
Limitations and future directions noted by the authors
- Answer bias is only mitigated, not eliminated: untrusted memory can still affect non-consequential answers; TMA-NM guards the path from retrieval to action (Section IX (a)).
- Guarantees are conditional on correct provenance annotation and truly independent corroboration; a fully compromised trusted tool could still launder a value, so elevation requires at least two independent trusted sources (Section IX (b)).
- In black-box deployment, determining which retrieved value the agent actually used requires value-level taint. The text-agent proxy used in the supporting cross-model study can be evaded by an obfuscating adversary. Value-level taint on nested structured payloads, and full value-level capability tokens, are listed by the authors as future work; pure context assembly also falls into the same gap (Section IX (c)).
- The multi-turn loop and Mem0 experiments use a focused scenario set; broadening the task distribution is future work (Section IX (d)).
- The separation is machine-checked on a bounded model and extended to unbounded execution via inductive invariants; an unbounded deductive proof in TLAPS/Lean remains future work (Section IX (e), Section IV).
- When fewer than k independent trusted sources are available, the fallback is one-time user confirmation rather than silent denial. How common two independent sources are for everyday actions depends on deployment; field quantification is future work (Section IX (f)).
Experimental coverage
- Main experiment models: gpt-5-chat, gpt-4o-mini, claude-opus-4.1, claude-sonnet-4.5, gemini-2.5-flash, llama-4-maverick, deepseek-chat, qwen3-235b, 8 in total (Section VI).
- Defenses: none, trust score (instance in cross-model study is prob detect), lineage, capability ifc, TMA-NM; unified benchmark includes direct attack, L-a/b/c, and legit-utility and uncorr-auto (Section V–VI, Table I).
- Also: trigger-style study (TMA-NM 0/4032), four published pipelines (0/1152), multi-turn tool loop (n=128 per defense), and Mem0 backend (six models, n=96 per defense) (Section VI).
- Bounded model M: Slots=3, sessions≤2, k=2; TLC enumerates 3,270 reachable states; inductive step checked by TLC, parameter independence is a hand-written argument (Section IV). Implementation checks: Action Integrity 120 configs and Elevation Soundness 64 corroborator sets.
- Sensitivity, threshold, independence, and lineage default policies use 3 models; the paper does not name them. The paper does not report answer bias proportions. Cross-agent shared memory is marked out of scope in Section II.
Summarize the main content of the paper
TMA-NM uses source-bound action permissions to block memory laundering; the direct and laundered ASR across eight models is 0%.
TMA-NM binds the action authority of LLM agent long-term memory to write-time provenance, used to block cross-session memory poisoning.
- Problem: Untrusted content can be stored first, then via self-summarization, trusted tool echo, or fabricated corroboration, become memory whose content appears benign and whose derivation edges are severed or flipped to trusted, subsequently driving payments, setting changes, or exfiltration. The adversary cannot forge origin and does not control the user authorization channel.
- Approach: Assign act class by arrival channel; derived items and tool outputs that consume untrusted inputs inherit the maximum untrusted level; consequential actions accept only corroboration from at least two independent trusted subjects, or one-time user authorization bound to the specific action; verdicts are appended to a hash chain.
- Formal results: The abstract summarizes T1–T3 as malleable defenses are unsound, write-time binding is necessary, and non-malleable authority is sufficient. Section IV confines these statements to model M with Slots=3, sessions≤2, k=2; TLC checked the sufficiency direction over 3,270 reachable states, and the witness trace is writing an untrusted item, then paraphrasing, then acting.
- Measurements: In the Table I eight-model summary, TMA-NM has direct-ASR and laund.-ASR of 0%, legit-utility of 100%, and uncorr-auto of 0%; none has 84%, 68%, 100%, 100%. In the trigger style study, TMA-NM is 0/4032 with utility 95.9%, the same as no defense. Removing provenance binding gives ASR of 44/28/22; removing the elevation gate drops utility from 96% to 77% (Table IV, eight-model mean).
- Authors' conclusion: Memory integrity is not a detection problem but whether the adversary can launder the action authority of untrusted memory; the gate executes outside the model and does not depend on model alignment. The authors also state explicitly that non-consequential answer bias is not within the elimination scope, and guarantees are conditional on A1 and corroboration independence.