Carryover Attacks: Prompt Injections That Outlive the Session
CarryoverBench (EMNLP 2026) shows that a payload planted in agent memory or a heartbeat task keeps firing in later sessions, long after the attacker has left.
What is this?
On October 20, 2026, a team of researchers posted “After the Attacker Leaves: Benchmarking Carryover Attacks on LLM Agents” to arXiv (2610.28425), accepted to the EMNLP 2026 main conference. The paper names a class of indirect prompt injection called carryover attacks: a single payload is written into a persistent channel of the agent, and keeps influencing later sessions without the attacker being present. The two channels studied are long-term memory files injected into the system prompt, and scheduled “heartbeat” tasks that wake the agent with no user input.
Most prompt-injection benchmarks only score the session in which the malicious content first appears. CarryoverBench scores what happens afterwards. A separate paper listed on Hugging Face Papers (2607.14611, “Bad Memory”) reaches a consistent conclusion on file-based memory in coding agents.
How it works
The benchmark contains 12 personal-assistant task families and 101 attack tasks, split across three trigger channels: instant (same-turn injection, the classic baseline), autonomous (a heartbeat task fires with a minimal prompt) and latent (a memory entry resurfaces during a related, later user request). A deterministic verifier scores two stages separately: plant (the payload is persisted) and trigger (a later session acts on it).
Five models were tested on one agent harness. Overall attack success ranged from 11.9% (GPT-5.4) and 18.8% (Claude-Sonnet-4.6) to 27.7% (GLM-5), 51.5% (Gemini-3.1-Pro) and 63.4% (Qwen3-235B-A22B). The key finding: once a payload is planted, it generally keeps firing across five follow-up rounds with no measurable decay, because it sits unchanged in workspace files. Re-running the latent channel on a second runtime reduced success for every model (for example Qwen 52.8% to 27.8%) but never reached zero. “Bad Memory” similarly reports that payloads in files such as CLAUDE.md or AGENTS.md persisted, and that one model often flagged a payload as malicious yet left it in place.
The authors note limits: a finite-alias verifier (likely false negatives), a single harness, and latent trigger rates that are probably upper bounds. Treat the figures as relative signals, not absolute risk. The study used fictional identities and sandboxed stubs.
Why it matters
Persistence changes the economics of an injection. The attacker needs one successful write; every later session inherits it. It also defeats session-scoped review: the dangerous content is no longer in the visible conversation but in a file the agent trusts by default. Agents with memory, cron-like wakeups or autonomous heartbeats are the exposed population.
Defenses
- Gate cross-session writes. Require review or explicit approval before an agent edits memory, root instruction files or scheduled-task definitions.
- Tier memory by trust. Let low-trust notes provide facts but never override safety rules or global behaviour.
- Validate state at session start. Diff memory and heartbeat files against a known-good baseline and alert on unexplained changes.
- Restrict capabilities and egress. Allowlist outbound destinations and limit tools available to autonomous wakeups.
- Do not rely on prompt-level fixes alone. In the paper, system-prompt principles and spotlighting reduced mostly the plant stage and rarely closed the trigger stage; runtime controls are needed in addition.
Status
| Item | Detail |
|---|---|
| Primary source | arXiv 2610.28425, submitted 2026-10-20, EMNLP 2026 main |
| Corroborating source | Hugging Face Papers 2607.14611 (file-based memory in coding agents) |
| Benchmark release | Authors state tasks, verifiers and transcripts will be released upon acceptance |
| Vendor patch | Not applicable: behavioural class, not a single product flaw |