Persistent Billable State: Denial-of-Wallet Attacks and Defenses in Tool-Calling LLM Agents
Jinqian Zhang, Haojun Xia, Shujiang Wu, Jingkun Yue, Xia Zhang, Zhangpei Cheng, Bibo Tu
Abstract
Multi-step tool-calling LLM agents rely on host runtimes to preserve state across turns. When a runtime carries an external tool return into later model inputs, providers meter it again. An adversary who controls the return of an already configured tool can thereby convert that return into recurring victim-billed processing without victim credentials or local runtime privilege. We call such retained content persistent billable state and formalize the host's decision over whether and how it enters later billable context as the persistent billable-state boundary. We present the first systematic security study of this post-admission lifecycle. We derive 6 denial-of-wallet attack vectors and build DoW-Bench, an end-to-end harness evaluated across 6 model families. Across 243 executions, the maximum per-session cumulative input reaches 14,293x the corresponding session's complete first-call input. Retaining raw history increases mean effective session cost by 21.2-35.9%. Compression succeeds on 10/12 and 11/12 history-dependent tasks, versus 2/12 under deletion for each provider. To govern this boundary, we combine deterministic history transformation with 4 host-side invariants that bound prompt mass, context growth, recursive opportunity, and cumulative spend before reingestion. The host-side kernel stops all 41 retained attack traces under each of 3 replay presets. Separate live integrations exercise enforcement before subsequent model calls. A full-code audit of 95 randomly sampled public MCP server and transport repositories finds an author-verified, code-visible safeguard in only 17 (17.9%); 1 bounds cost, and none combines all 4 safeguard families. These results establish persistent billable state as a first-class security object and pre-reingestion as its host-owned control point. Confirmed disclosure also assigns that placement to the host application.
Create a lesson
Metadata
- Categories
- cs.CR, cs.AI
- Comments
- 19 pages, 9 figures
Related papers
SEAD: A State-Based Perspective on Attack and Defense in Tool-Using Agents
Shared title terminologycs.CRXinjie Shen, Junran Wang, Rongzhe Wei et al.
Silent Failures in Agentic Security Evaluation: A Validated Harness for Tool-Call Mediation Under Indirect Prompt Injection
Shared title terminologycs.CRAnimesh Shaw
SilentCall: Hidden Tool-Call Backdoors in Open-Weight Agents, and How to Catch Them
Shared title terminologycs.CRBhanu Pallakonda, Mikkel Hindsbo, Sina Ehsani et al.
AGATE: Provenance-Based Runtime Defense Against Compositional Attacks on LLM Agents
Shared title terminologycs.CRXiaorui Zhang, Zhuoran Cheng, Kailin Liu et al.
Data Poisoning Attacks and Defenses to Local Differential Privacy Protocols: A Survey
Shared title terminologycs.CRXinyu Li, Xuebin Ren, Shusen Yang et al.
Assessing the Robustness of Defense Frameworks Against Data Attacks on AI Systems
Shared title terminologycs.CRVishnu Kurnala, Nelly Elsayed