ClawWorm: Self-Propagating Attacks Across LLM Agent Ecosystems

Yihao Zhang, Zeming Wei, Xiaokun Luan, Chengcan Wu, Zhixin Zhang, Jiangrong Wu Haolin Wu Huanran Chen Jun Sun Meng Sun · 2026

Read ClawWorm: Self-Propagating Attacks Across LLM Agent Ecosystems by Yihao Zhang, Zeming Wei, Xiaokun Luan, Chengcan Wu, Zhixin Zhang, Jiangrong Wu Haolin Wu Huanran Chen Jun Sun Meng Sun (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-15727.txt.

Introduction

Zhang and co-authors unveil AgentWorm, a self-spreading attack on agent ecosystems. Long-running agents with tools and messaging form dense, linked networks. One crafted message starts the whole infection cycle. The worm rewrites the victim's core configuration for persistence. It runs a payload at each reboot, then copies itself to new peers. Tests spanned five model backends, three entry paths, and three payload types. The aggregate success rate hit 63 percent. Key loop-breaking controls were off in all observed public setups.

Catalog record

CREATORYihao Zhang, Zeming Wei, Xiaokun Luan, Chengcan Wu, Zhixin Zhang, Jiangrong Wu Haolin Wu Huanran Chen Jun Sun Meng Sun
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE59236
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2603.15727

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

ClawWorm: Self-Propagating Attacks Across LLM Agent Ecosystems Yihao Zhang, Zeming Wei, Xiaokun Luan, Chengcan Wu, Zhixin Zhang, Jiangrong Wu Haolin Wu Huanran Chen Jun Sun Meng Sun Abstract Autonomous LLM-based agents increasingly operate as long-running processes forming densely interconnected multi-agent ecosystems, whose security properties remain largely unexplored. In particular, OpenClaw, an open-source platform with over 40,000 active instances, has stood out recently with its persistent configurations, tool-execution privileges, and cross-platform messaging capabilities. In this work, we present ClawWorm, the first self-replicating worm attack against a production-scale agent framework, achieving a fully autonomous infection cycle initiated by a single message: the worm first hijacks the victim’s core configuration to establish persistent presence across session restarts, then executes an arbitrary payload upon each reboot, and finally propagates itself to every newly encountered peer without further attacker intervention. We evaluate the attack on a controlled testbed across four distinct LLM backends, three infection vectors, and three payload types (1,800 total trials). We demonstrate a 64.5% aggregate attack success rate, sustained multi-hop propagation, and reveal stark divergences in model security postures—highlighting that while execution-level filtering effectively mitigates dormant payloads, skill supply chains remain universally vulnerable. We analyse the architectural root causes underlying these vulnerabilities and propose defence strategies targeting each identified trust boundary. Code and samples will be released upon completion of responsible disclosure. 1 Introduction The rapid advancement of large language models (LLMs) has catalysed a paradigm shift from static dialogue systems to fully autonomous agents capable of sustained, real-world interaction. Modern LLM-based agents leverage tool-use capabilities to operate as long-running processes with broad system-level privileges. Open-source frameworks such as AutoGPT [ 12 ] , LangChain [ 3 ] , and OpenDevin [ 36 ] have democratised access to agentic AI, while standardised protocols like the Model Context Protocol [ 2 ] have begun to unify how agents connect to external services. Among these ecosystems, OpenClaw [ 1 ] stands out as one of the largest real-world deployments of autonomous AI agents. OpenClaw is a self-hosted agent runtime in which each instance maintains a persistent local workspace, governed by a set of Markdown workspace files. For instance, SOUL.md for the agent’s personality, values, and behavioural philosophy, AGENTS.md for operational rules and session procedures, and per-skill SKILL.md files for third-party extensions distributed through ClawHub, a community-driven skill marketplace. The framework integrates with over 50 messaging platforms (Telegram, Discord, WhatsApp, Slack, Signal, among others) and provides built-in tools for shell execution, browser automation, and file management. With over 300,000 GitHub stars and more than 40,000 active instances, OpenClaw forms a densely interconnected agent ecosystem whose security properties remain largely unexplored. The security risks of agentic AI have received substantial research attention. Prior work has demonstrated that LLM-integrated applications are susceptible to indirect prompt injection [ 13 ] , that jailbreaking attacks can systematically circumvent safety alignment [ 46 , 38 ] , and that refusal-trained LLMs exhibit significant safety degradation when deployed as tool-using agents [ 22 , 7 ] . However, the threat of autonomous, cross-instance worm propagation within agent ecosystems remains critically underexplored. The Morris II worm [ 8 ] demonstrated self-replicating prompts in email assistants, and concurrent analyses have warned that autonomous agents may serve as vectors for self-spreading malware [ 11 ] , yet these studies operate within simulated or narrowly scoped environments that do not capture the complexity of real-world, multi-instance ecosystems. In particular, no prior work has examined self-replicating attacks against OpenClaw, despite its scale and the architectural properties that make it an especially consequential target. Figure 1 : An illustration of the ClawWorm infection lifecycle within the OpenClaw network. An initial compromise autonomously propagates through the densely interconnected ecosystem, rapidly spreading the infection across multiple agent hops. In this work, we present ClawWorm, a cross-instance prompt propagation attack that achieves self-replicating, worm-like infection across autonomous AI agents in a production-scale ecosystem. Unlike prior self-replicating attacks such as Morris II [ 8 ] , which operate in toy sandboxes with simplified GenAI email assistants under strong application-specific assumptions, ClawWorm targets OpenClaw and exploits its actual runtime architecture rather than an abstract threat model. Our approach advances the attack surface beyond prior work in three fundamental respects. (1) Direct agent control acquisition : whereas existing attacks such as Morris II [ 8 ] manipulate application-layer outputs through RAG poisoning without gaining persistent control over the agent itself, ClawWorm hijacks the victim’s core configuration files to achieve system-prompt-level authority over its entire behavioural stack, enabling arbitrary payload execution through the agent’s full tool privileges including shell access, file operations, and network communication. (2) Autonomous persistent propagation : prior self-replicating attacks are confined to single-hop, stateless transmission (e.g., forwarding a poisoned email) that ceases once the retrieval context rotates. ClawWorm establishes a dual-anchor persistence mechanism that survives indefinitely across session restarts and autonomously propagates the complete payload during routine interactions, sustaining multi-hop infection chains without further attacker intervention. (3) Production-scale real-world validation : existing studies operate within synthetic sandboxes or narrowly scoped simulations that do not capture the complexity of real-world agent ecosystems. ClawWorm is demonstrated against unmodified OpenClaw with its actual runtime code, evaluated across multiple attack vectors and payload types on a testbed that faithfully reproduces the architectural properties of the current ecosystem. We validate ClawWorm through a comprehensive evaluation on a controlled testbed running unmodified OpenClaw, crossing three attack vectors with three payload types against four distinct LLM backends (1,800 independent trials). ClawWorm achieves an aggregate attack success rate of 64.5%. Crucially, our multi-model analysis reveals significant variance in defensive capabilities: while some models employ execution-layer filtering to block dormant payloads effectively, supply chain vectors (Vector B) consistently bypass safety reasoning across all tested models (81% aggregate ASR). Multi-hop experiments demonstrate sustained autonomous propagation over up to 5 hops, with chain attenuation driven predominantly by LLM semantic degradation in text-based transmission. To our knowledge, this constitutes the first demonstration of a self-replicating worm operating within a production-scale autonomous agent ecosystem. Beyond the attack, we analyze its architectural root causes and propose defence strategies: context privilege isolation, configuration integrity verification, zero-trust tool execution, and supply chain hardening. All experiments were conducted within isolated private networks with no impact on production systems. Although we use OpenClaw as the concrete target, the vulnerabilities that ClawWorm exploits are not idiosyncratic implementation flaws but structural consequences of an architectural pattern shared by a growing class of autonomous agent ecosystems. Any current or future framework that shares similar architecture is susceptible to the same class of self-replicating attacks, regardless of its specific branding or implementation. Our findings therefore serve as a broader warning: as autonomous agent ecosystems continue to proliferate, the structural risks demonstrated here demand proactive, architecture-level mitigation across the entire design space. Our contributions are as follows: • We identify and characterise cross-instance prompt propagation vulnerabilities arising from the architectural design of real-world agent ecosystems. • We propose ClawWorm, the first self-replicating worm demonstrated against a production-scale agent framework, achieving single-message infection, permanent persistence, and autonomous propagation without server access, API credentials, or model weight access. • We design a factorial evaluation with real-execution verification across three vectors and three payload types, supplemented by persistence and multi-hop experiments that reveal LLM semantic degradation

Read the complete text