# Clawdrain: Exploiting Tool-Calling Chains for Stealthy Token Exhaustion in OpenClaw Agents

DevFeed: [Clawdrain: Exploiting Tool-Calling Chains for Stealthy Token Exhaustion in OpenClaw Agents](<https://devfeed.tech/articles/clawdrain-exploiting-tool-calling-chains-for-stealthy-token-exhaustion-in-openclaw-agents-113463.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2603.00902>)

Author: Ben Dong, Zhonghao Guo, Tianyi Li, Qian Wang

Published: 2026-11-03T05:00:00Z

Content type: news

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>), [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [LLM security](<https://devfeed.tech/topics/llm-security.md>), [OpenClaw](<https://devfeed.tech/topics/openclaw.md>), [Agent Skills](<https://devfeed.tech/topics/agent-skills.md>), [AI software supply chain security](<https://devfeed.tech/topics/ai-software-supply-chain-security.md>), [Multi-step AI processes](<https://devfeed.tech/topics/multi-step-ai-processes.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>)

Tags: [agents](<https://devfeed.tech/tags/agents.md>), [api](<https://devfeed.tech/tags/api.md>), [attack](<https://devfeed.tech/tags/attack.md>), [attack-surface](<https://devfeed.tech/tags/attack-surface.md>), [autoregressive](<https://devfeed.tech/tags/autoregressive.md>), [claude](<https://devfeed.tech/tags/claude.md>), [claude-sonnet](<https://devfeed.tech/tags/claude-sonnet.md>), [compliance](<https://devfeed.tech/tags/compliance.md>), [context](<https://devfeed.tech/tags/context.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [deepseek](<https://devfeed.tech/tags/deepseek.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [llm](<https://devfeed.tech/tags/llm.md>), [llm-agents](<https://devfeed.tech/tags/llm-agents.md>), [malicious](<https://devfeed.tech/tags/malicious.md>), [openclaw](<https://devfeed.tech/tags/openclaw.md>), [token](<https://devfeed.tech/tags/token.md>), [token-exhaustion](<https://devfeed.tech/tags/token-exhaustion.md>), [tool](<https://devfeed.tech/tags/tool.md>), [tool-calling](<https://devfeed.tech/tags/tool-calling.md>)

## AI overview

Clawdrain is a Trojanized OpenClaw skill that uses a Segmented Verification Process (SVP)--stateful progression, repair-driven repetition, and termination--to trigger costly tool-call chains while still delivering a legitimate final payload. In a production-like deployment with real API billing, plain SVP amplified token use by 2-16x across Gemini 2.5 Pro, DeepSeek V4 Flash, and Claude Sonnet 4.6. The models showed different behaviors: autoregressive compliance, proactive scripting, and extended trial-and-error reasoning. The abstract attributes exhaustion to repeated context ingestion, tool coordination, reasoning, and recovery as well as output generation, and calls for system-level controls on cumulative skill behavior.

## Source excerpt

arXiv:2603.00902v2 Announce Type: replace-cross Abstract: Tool-calling LLM agents rely on third-party skills to extend their capabilities, but this openness exposes a supply-chain attack surface in which malicious skill instructions can manipulate agent execution across multiple turns. In this work, we present Clawdrain, a Trojanized OpenClaw skill that induces resource exhaustion through a Segmented Verification Process (SVP). SVP combines stateful progression, repair-driven repetition, and termination to create costly tool-calling chains while preserving a legitimate final payload. We evaluate Clawdrain in a production-like OpenClaw deployment with real API billing across Gemini 2.5 Pro, DeepSeek V4 Flash, and Claude Sonnet 4.6. Clawdrain achieves 2-16 times token amplification with plain SVP, while the three models exhibit distinct behaviors, including autoregressive compliance, proactive scripting, and extended trial-and-error reasoning. Our findings reveal that agent resource exhaustion arises not only from output generation, but also from repeated context re-ingestion, tool coordination, reasoning, and recovery, motivating system-level controls over cumulative skill behavior.