New to ShortSpan? We distil the AI-security research that matters into practitioner takeaways — edited by Ben Williams (NCC Group). Get the weekly email
// Analysis

PoEM stops forged reasoning in LLM agents

Agents
PoEM stops forged reasoning in LLM agents

A new defence for Large Language Model (LLM) agents shows how to stop forged-reasoning attacks. Reworded memory entries defeat prior wording filters and succeed more often on stronger models (up to 100%). PoEM ties safety skips to a tamper-evident ledger, cutting attack success to 0% with negligible overhead and few false positives.

LLM agents lean on external memory to remember what happened between steps. That memory is treated as ground truth. If an attacker can write to it, they can steer behaviour without ever issuing a malicious command. The current trick: plant a plausible note that says a required safety step already ran, so the agent obligingly skips it.

How the attack lands

A prior defence tried to police wording. It scanned memory for suspicious phrases and blocked entries that looked like forgeries. The authors show how thin that line is. An automated attacker that simply asks a model to reword the forged note walks past the filter on the first try. Worse, the success rate rises with capability: forged-reasoning hits 98–100% on GPT-4o and GPT-4o-mini, but only 44% on Llama-3.1-8B. Stronger models infer implied claims and follow them more faithfully. The filter’s protection collapses to statistically indistinguishable from none.

This is a classic integrity problem dressed up as reasoning. Stateless agents are over-trusting their notes-to-self. The adversary does not need to shout; they nudge with ordinary-sounding text, and the agent thanks them by skipping the guardrail.

Why PoEM holds

Proof-of-Execution Memory (PoEM) sidesteps text inspection entirely. It keeps a separate, tamper-evident, HMAC-chained, append-only ledger of safety steps that actually executed. Only the trusted action layer holds the key and can append entries. When the agent wants to skip a step, a cheap grounding check consults the ledger and verifies the chain. If there is no matching execution event, there is no skip. Rewording the memory is irrelevant because the memory is not the source of authority.

Across three models and three scenarios, PoEM drives attack success to 0%. Legitimate operations continue: 0% false positives in eight of nine model–scenario cells and 1.7% in the ninth. The wording-based defence, by contrast, wrongly blocks 33–50% of legitimate work. Overhead is tiny: microseconds to low milliseconds, about 1.46 ms at a ledger size of 1000 entries, roughly 0.12% of a single model call. The design drops into a real LangChain agent unchanged.

The authors also push at PoEM directly. Forged ledger entries, cross-subject replay, and judgement reframing do not land; ablations show subject scoping and chain integrity are necessary pieces. There are limits. PoEM only protects what it explicitly gates. Ledger entries authorise skips indefinitely unless a freshness policy is added. And everything depends on the trusted runtime and the HMAC key: compromise those, or invoke the genuine action path, and the guarantee collapses. The threat model also assumes the attacker cannot alter agent code or observe execution.

There is a broader lesson here. We are moving from vibes-based moderation to verifiable execution. For high-risk agent actions, tamper-evident execution trails look less like an option and more like table stakes. The open questions are governance ones: how we standardise trusted runtimes, manage keys across vendors, and decide which decisions must be gated without strangling usability. Those choices will decide whether this approach scales beyond neat lab demos.

Additional analysis of the original ArXiv paper

📋 Original Paper Title and Abstract

Proof-of-Execution Memory: Defending LLM Agents Against Forged-Reasoning Attacks by Verifying What Actually Happened

Authors: Md Habibur Rahman and Jaeho Kim
LLM agents are stateless and rely on external memory to carry context between steps. Because agents treat that memory as trustworthy, an adversary who can write to it can steer their behavior. The FARMA attack does this with no malicious command: it inserts fabricated entries into the agent's reasoning memory claiming a required safety step is already done, so the agent skips it. SENTINEL, the defense proposed with FARMA, scores entries against a fixed list of suspicious wordings; its authors note that an attacker who knows the list can reword the forgery and evade it, and leave this open. We show the gap is worse than stated. An automated attacker that simply asks a language model to reword the forgery evades SENTINEL on its first try, reducing its protection to zero on every model tested. We also find a capability paradox: the attack succeeds far more often on stronger models (98-100% on GPT-4o and GPT-4o-mini) than on Llama-3.1-8B (44%), because more capable agents follow reworded claims more faithfully, so the threat grows with capability. We propose Proof-of-Execution Memory (PoEM), which does not inspect memory at all. PoEM keeps a separate, tamper-evident, HMAC-chained ledger of the safety steps that actually executed, writable only by the trusted action layer, and allows a skip only if the ledger confirms real execution. An attacker can change what memory says but cannot forge a ledger entry for a step that never ran, so rewording no longer helps. Across three models and three scenarios, PoEM drives attack success to 0% while leaving legitimate operation intact (0% false positives in eight of nine cells, 1.7% in the ninth, within sampling noise), whereas SENTINEL wrongly blocks 33-50% of legitimate operations. PoEM also withstands attacks aimed at itself, adds microseconds of overhead, and works unchanged in a real LangChain agent. PoEM protects exactly the decisions it gates.

🔍 ShortSpan Analysis of the Paper

Problem

This paper studies forged-reasoning attacks on stateless LLM agents that rely on external memory to carry context between steps. An adversary who can write to that memory can insert fabricated entries that claim a required safety step has already run, inducing the agent to skip it. A prior defence that inspects memory wording and flagged phrases can be evaded by simple rewording. The paper shows that an automated attacker using an LLM to rephrase forged entries defeats wording-based defences with high efficiency, and that the risk increases for stronger models which better infer implied claims.

Approach

The authors introduce Proof-of-Execution Memory (PoEM). Rather than inspect memory text, PoEM maintains a separate, tamper-evident, HMAC-chained, append-only ledger of safety steps that actually executed. Only the trusted action-execution layer can append ledger entries using a secret key held inside the trusted runtime. At decision time a lightweight grounding check consults the ledger and allows a skip only if a matching execution event is present and the chain verifies. The threat model matches the prior work: the attacker may write to the reasoning memory but cannot modify agent code or observe execution. The defence is evaluated across three models (Llama-3.1-8B, GPT-4o-mini, GPT-4o), three agent scenarios, and against an automated adaptive attacker that repeatedly prompts an LLM to produce reworded forgeries that evade a reproduced wording filter (SENTINEL). The design is ported unchanged to a LangChain agent using a vector-store memory.

Key Findings

  • An automated adaptive attacker that rewords forgeries reduces the wording-based filter's protection to zero on every model tested; SENTINEL's attack success rate becomes statistically indistinguishable from no defence.
  • There is a capability paradox: adaptive forged-reasoning succeeds far more often on stronger models (98–100% attack success on GPT-4o and GPT-4o-mini) than on Llama-3.1-8B (44%), because stronger models infer subtle implied claims and follow them.
  • PoEM drives attack success to 0% across all three models and three scenarios while preserving legitimate operation: false-positive rate 0% in eight of nine model–scenario cells and 1.7% in the ninth. By contrast, the wording-based defence wrongly blocks 33–50% of legitimate operations in some cases.
  • PoEM resists direct attacks targeting the ledger (forged entries, cross-subject replay, judgement-reframing); an ablation shows subject scoping and chain integrity are necessary design elements.
  • Performance and deployability: the grounding check cost is microseconds to low milliseconds (1.46 ms at ledger size 1000, about 0.12% of a single LLM call), storage is small, complexity is O(N) for full verification but amortisable to O(1), and the defence works unchanged in a LangChain deployment.

Limitations

PoEM protects only the specific decisions it is configured to gate; ungated harmful actions remain out of scope. Ledger entries authorise skips indefinitely unless a freshness policy is added. Security depends on keeping the HMAC key and trusted runtime uncompromised; if the attacker obtains the key or can invoke the genuine action path, the guarantee collapses. The threat model assumes the attacker cannot modify agent code or observe execution.

Implications

Offensively, any capability that allows writing to an agent's memory can be used to bypass safety steps by planting plausible reasoning notes; optimised rewording is highly effective and scales with agent capability. Wording-based defences are inadequate because an attacker can produce ordinary-seeming text that convinces stronger models. PoEM raises the bar for such attacks by tying skips to actual execution events that an attacker cannot fabricate without performing the guarded step, but it shifts offensive focus to the trusted runtime and key management: compromising the action-execution layer or exfiltrating the ledger key would restore an attacker’s power. Attackers may therefore prioritise compromising authorised writers, the runtime environment, or expanding impact by targeting ungated decisions.

// Similar research

Related Research

Get the weekly digest

The few AI-security papers that matter, with the practitioner takeaway. No spam.