Skip to content

2603.19974v1

arxiv.org • October 21, 2026

Autonomous coding agents are increasingly integrated into software development workflows, offering capabilities that extend beyond code suggestion to active system interaction and environment management. OpenClaw, a representative platform in this emerging paradigm, introduces an extensible skill ecosystem that allows third-party developers to inject behavioral guidance through lifecycle hooks during agent initialization. While this design enhances automation and customization, it also opens a novel and unexplored attack surface. In this paper, we identify and systematically characterize guidance injection, a stealthy attack vector that embeds adversarial operational narratives into bootstrap guidance files. Unlike traditional prompt injection, which relies on explicit malicious instructions, guidance injection manipulates the agent’s reasoning context by framing harmful actions as routine best practices. These narratives are automatically incorporated into the agent’s interpretive framework and influence future task execution without raising suspicion.We construct 26 malicious skills spanning 13 attack categories—including credential exfiltration, workspace destruction, privilege escalation, and persistent backdoor installation. We evaluate them using ORE-Bench, a realistic developer workspace benchmark we developed. Across 52 natural user prompts and six state-of-the-art LLM backends, our attacks achieve success rates from 16.0% to 64.2%, with the majority of malicious actions executed autonomously without user confirmation. Furthermore, 94% of our malicious skills evade detection by existing static and LLM-based scanners. Our findings reveal fundamental tensions in the design of autonomous agent ecosystems and underscore the urgent need for defenses based on capability isolation, runtime policy enforcement, and transparent guidance provenance.

Autonomous coding agents are rapidly transforming software development workflows ( Yang et al., 2024 ; Wang et al., 2025 ) . Systems such as OpenClaw integrate large language models with local execution environments, enabling agents to perform complex tasks including repository maintenance, environment configuration, system diagnostics, and automated development operations ( OpenClaw Docs, 2026b ; OpenClaw, 2026b ; Anthropic, 2026a ) . Unlike traditional assistants that only generate code suggestions, these agents actively interact with the user’s filesystem, execute commands, and manage development environments ( Anthropic, 2025b ) .

The OpenClaw ecosystem has experienced remarkable growth since its introduction ( OpenClaw, 2026a ) . Recent public materials and community reporting suggest that OpenClaw has attracted a rapidly expanding user base and that the number of available skills across official and community marketplaces has grown substantially ( The Verge, 2026 ; James, 2026 ) . Major technology companies have also discussed internal uses of agentic coding systems for automating development workflows, further reflecting the practical momentum of this paradigm ( Yang et al., 2024 ; Wang et al., 2025 ) . The skill ecosystem, in particular, has become an important adoption channel for reusable automation capabilities, including tools for documentation generation, CI/CD assistance, and dependency management ( OpenClaw Docs, 2026a ) . This rapid adoption makes understanding OpenClaw’s security properties critically important, as vulnerabilities could affect a substantial and growing portion of the software development community ( Liu et al., 2026 ) .

To support extensibility, OpenClaw introduces a skill ecosystem that allows third-party developers to augment agent capabilities ( OpenClaw Docs, 2026d ; OpenClaw Docs, 2026a ) . Skills can register lifecycle hooks that intercept agent events and modify the agent’s operational context. In particular, the agent:bootstrap hook allows skills to inject guidance files into the agent’s context before any user interaction occurs ( OpenClaw Docs, 2026c ) . These bootstrap files are intended to provide operational best practices and workflow guidance that the agent may consult while interpreting user instructions ( OpenClaw Docs, 2026d ; OpenClaw Docs, 2026c ) . Through an analysis of the official ClawHub marketplace, we identified 134 popular skills that actively utilize these lifecycle hooks to enhance functionality. Notably, the highest-rated skill in this category, “self-improving-agent,” which dynamically adjusts its behavior based on usage patterns, has already achieved 221,000 downloads, demonstrating both the utility and the potential reach of hook-based customizations.

While this mechanism enables flexible customization, it also introduces a previously unexplored security risk ( Liu et al., 2026 ; Wang et al., 2026 ; Schmotz et al., 2026 ) . Because bootstrap guidance is incorporated into the agent’s reasoning context, malicious skills can manipulate the agent’s interpretation of user requests without issuing explicit commands ( OpenClaw Docs, 2026c ; Zhan et al., 2024 ) . This creates a new attack surface fundamentally different from traditional prompt injection ( Greshake et al., 2023 ; Liu et al., 2023 ; Liu et al., 2025 ) .

In this work, we identify and study a new class of attacks that exploit this mechanism, which we term Guidance Injection . Instead of inserting direct malicious instructions, the attacker embeds carefully crafted operational narratives into bootstrap guidance files. These narratives subtly redefine what constitutes “routine” or “best-practice” operations. When users later issue ambiguous or high-level requests (e.g., cleaning disk space or optimizing performance), the agent autonomously operationalizes these narratives and performs destructive or unauthorized actions.

Figure 1 illustrates the guidance injection attack workflow. A malicious skill injects adversarial guidance during the bootstrap phase, which becomes part of the agent’s reasoning context. When a user subsequently issues an ambiguous request, the agent interprets it under the influence of the injected guidance, leading to autonomous execution of unintended operations within the developer’s workspace ( Zhan et al., 2024 ; Yi et al., 2025 ) . This guidance injection attack differs fundamentally from traditional skill-based attacks in both mechanism and impact. Traditional attacks typically inject explicit malicious instructions that override user commands, making them detectable through static analysis or obvious behavioral anomalies. In contrast, guidance injection operates by subtly reshaping the agent’s interpretive framework—the attacker does not command the agent to perform harmful actions directly, but rather redefines what the agent considers to be normal, helpful behavior ( Wallace et al., 2024 ; Schmotz et al., 2026 ) . When a user later asks for routine maintenance, the agent, operating under its corrupted understanding of “best practices,” autonomously executes destructive actions while believing it is being helpful. This distinction explains why guidance injection is particularly insidious: the attack succeeds precisely when the agent appears to be functioning normally, following what it genuinely believes to be appropriate operational guidelines, making detection substantially more difficult than overt malicious command injection ( Hubinger et al., 2024 ) .

Guidance injection becomes particularly dangerous in OpenClaw due to three architectural properties that distinguish it from earlier coding agents.

Access to Private Data. Unlike systems such as Claude Code ( Anthropic, 2025a ) that operate primarily within a project workspace, OpenClaw agents can access the user’s broader environment, including configuration directories, credential stores, and development tool settings.

Exposure to Untrusted Content. OpenClaw agents may ingest information from external sources including web searches, repositories, skill marketplaces, and documentation. Malicious skills or external content can therefore influence the agent’s reasoning context.

Autonomous Execution Capability. OpenClaw agents are designed to autonomously perform system operations such as file modification, command execution, and environment configuration ( OpenClaw Docs, 2026b ; Anthropic, 2026a ; Zhu et al., 2025 ) . Critically, the agent may resolve ambiguity in user requests by inferring appropriate actions rather than requesting clarification.

These three properties create a powerful but fragile security model. A malicious skill that modifies the agent’s bootstrap guidance can influence how the agent interprets ambiguous requests while simultaneously having access to sensitive local data and the ability to execute system-level operations.

We demonstrate that this design enables a wide range of real-world attacks. For example, a skill may frame version control metadata as disposable artifacts commonly removed in containerized environments. When a user later asks the agent to free disk space, the agent autonomously deletes .git directories from active repositories, permanently destroying commit history without explicit user approval. Importantly, these attacks are difficult to detect using existing defenses. Because malicious intent is embedded within benign-looking operational guidance, traditional static analysis fails to identify suspicious patterns. Furthermore, LLM-based semantic analyzers often interpret the guidance as legitimate DevOps best practices. To systematically study this attack surface, we build a comprehensive evaluation framework and conduct the first large-scale empirical analysis of guidance injection attacks against OpenClaw.

Our study makes the following contributions:

• We identify a new attack surface in OpenClaw’s skill architecture arising from lifecycle hooks and bootstrap context injection. We introduce Guidance Injection , a novel attack technique that manipulates agent reasoning through obfuscated operational narratives rather than explicit instructions.

We identify a new attack surface in OpenClaw’s skill architecture arising from lifecycle hooks and bootstrap context injection. We introduce Guidance Injection , a novel attack technique that manipulates agent reasoning through obfuscated operational narratives rather than explicit instructions.

• We construct 26 malicious skills spanning 13 attack categories including credential exfiltration, destructive workspace modification, and persistent system backdoors.

We construct 26 malicious skills spanning 13 attack categories including credential exfiltration, destructive workspace modification, and persistent system backdoors.

• We develop ORE, a realistic developer workspace benchmark for evaluating security risks in autonomous coding agents.

We develop ORE, a realistic developer workspace benchmark for evaluating security risks in autonomous coding agents.

• Across 78 natural prompts and six frontier LLM backends used by OpenClaw agents, we demonstrate attack success rates up to 89%, with most malicious actions executed without explicit confirmation. We analyze why existing defenses fail and propose architectural mitigations based on capability isolation and runtime policy enforcement.

Across 78 natural prompts and six frontier LLM backends used by OpenClaw agents, we demonstrate attack success rates up to 89%, with most malicious actions executed without explicit confirmation. We analyze why existing defenses fail and propose architectural mitigations based on capability isolation and runtime policy enforcement.

Our findings highlight fundamental security challenges in autonomous coding agents. As these systems gain deeper integration with developer environments, ensuring safe extensibility becomes a critical research problem.

2.1. LLM Agents, MCP, and Skills

LLM-Based Autonomous Agents. Modern agent architectures augment an LLM with a planning loop that interleaves chain-of-thought reasoning ( Wei et al., 2022 ) with tool invocation ( Yao et al., 2023 ; Schick et al., 2023 ) , enabling autonomous multi-step task execution ( Wang et al., 2023 ) . The agent’s behavior is governed by its context window —the concatenation of system instructions, tool descriptions, injected guidance, and conversation history. Two properties of this context-driven reasoning are security-relevant: LLMs exhibit a primacy effect where early context disproportionately influences outputs ( Liu et al., 2024 ) , and resolve ambiguous instructions via in-context learning , recombining salient patterns to fill gaps ( Wang et al., 2023 ) . Controlling early context therefore lets an attacker steer all subsequent interpretations.

Model Context Protocol. The Model Context Protocol (MCP) ( Anthropic, 2024 ) standardizes how agents discover and invoke external capabilities through a client–server interface over JSON-RPC ( Singh et al., 2025 ) . MCP enables a plugin-style ecosystem where third parties package capabilities as servers or skills consumable by any compliant agent, but this extensibility expands the trust boundary to include potentially untrusted packages.

Skills and Lifecycle Hooks. Skills bundle tools and behavioral guidance into marketplace-distributed packages that register lifecycle hooks at pipeline stages, such as initialization. Bootstrap hooks execute before any user interaction, injecting guidance into the agent’s foundational context. Although this mirrors software supply-chain extensibility ( Ohm et al., 2020 ) , bootstrap guidance operates at the semantic level- shaping interpretive priors rather than executing code-introducing an attack surface that static analysis cannot detect ( Greshake et al., 2023 ) .

2.2. OpenClaw Ecosystem and Skills Marketplace

OpenClaw Ecosystem. OpenClaw is a gateway-centric agent ecosystem built around a persistent Gateway that manages messaging surfaces, provider connections, and interactions between clients and execution nodes ( OpenClaw Docs, 2026b ; OpenClaw, 2026b ) . Rather than operating as a transient wrapper around model inference, it serves as a long-lived runtime that integrates communication, control, and execution within a single deployment ( OpenClaw Docs, 2026c ) . This architecture allows OpenClaw to coordinate agent behavior across local environments and external services, making it closer to an operational runtime than a simple inference interface.

Skills Marketplace. A core component of this ecosystem is the skills system, which acts as OpenClaw’s primary extensibility mechanism. OpenClaw loads skills from bundled, managed/local, and workspace-specific sources with explicit precedence rules, so the effective capability boundary of a deployment depends not only on the core runtime but also on the installed skill set ( OpenClaw Docs, 2026d ; OpenClaw, 2026b ) . Built on top of this mechanism, ClawHub serves as the public skills registry and distribution layer for reusable capabilities ( OpenClaw Docs, 2026a ; OpenClaw, 2026a ) . As a result, marketplace-distributed skills are not peripheral add-ons, but a routine path through which new behaviors and permissions enter the agent runtime.

Security Relevance. Because the marketplace mediates how external capabilities enter the runtime, it forms part of OpenClaw’s trust boundary rather than a purely auxiliary feature. Skills may introduce both executable functionality and behavioral guidance, meaning that security risks arise not only from code execution but also from how the agent’s operating context is shaped ( OpenClaw Docs, 2026c ; Liu et al., 2026 ; The Verge, 2026 ) . This observation is consistent with recent studies showing that agent-skill ecosystems expose substantial security risks in practice ( Wang et al., 2026 ) .

2.3. Skill Injection: Existing Cases and Literature

From Prompt Injection to Skill Injection. Skill injection can be viewed as a capability-mediated form of indirect prompt injection, in which malicious instructions are embedded into external skill artifacts rather than directly provided by the user ( Liu et al., 2026 ; Liu et al., 2025 ) . Prior work shows that large language models often fail to reliably separate informational content from actionable instructions, making externally supplied capability artifacts a natural attack carrier ( Liu et al., 2026 ; Wallace et al., 2024 ) .

Skill Ecosystems as an Attack Surface. The risk is amplified in skill ecosystems, where a skill is not merely passive text but a capability package that may include instructions, metadata, auxiliary resources, or setup logic ( OpenClaw Docs, 2026d ; OpenClaw Docs, 2026a ) . Large-scale measurement of real-world agent skills found that 26.1% of 31,132 analyzed skills contained at least one vulnerability, spanning prompt injection, data exfiltration, privilege escalation, and supply-chain risks ( Liu et al., 2026 ) . In this setting, skill injection is best understood as an attack that introduces malicious or deceptive capabilities into the agent runtime through the skill distribution and loading pipeline ( OpenClaw Docs, 2026c ; Liu et al., 2026 ) .

Existing Cases in OpenClaw. OpenClaw provides a concrete instance of this threat model. Recent work reports vulnerabilities across multiple stages of OpenClaw agent execution, including user prompt processing, tool usage, and memory retrieval ( Wang et al., 2026 ) . Public reports further show that malicious skills have appeared on ClawHub and were used to disguise harmful payloads as benign extensions, indicating that skill injection is not merely a theoretical extension of prompt injection but a practical attack vector in real-world agent marketplaces ( The Verge, 2026 ; James, 2026 ) .

We consider the OpenClaw autonomous coding agent architecture. OpenClaw integrates a large language model with a local execution environment capable of performing filesystem operations, executing shell commands, and managing development workflows.

OpenClaw supports a modular skill ecosystem in which third-party skills extend agent functionality. Skills can register lifecycle hooks that intercept internal agent events. In particular, the agent:bootstrap hook allows a skill to modify the agent’s initialization context by injecting guidance files through the context.bootstrapFiles interface. These bootstrap files, typically formatted as markdown documents such as SOUL.md or GUIDE.md , are designed to provide the agent with persistent operational principles and workflow preferences. Unlike temporary instructions that apply only to a single session, bootstrap guidance becomes part of the agent’s foundational reasoning context and influences interpretation across all subsequent user interactions. The OpenClaw architecture treats these files as trusted internal guidance that shapes how the agent understands its role, the user’s development practices, and appropriate responses to ambiguous requests.

Once initialized, the agent processes user requests using the underlying LLM and autonomously performs actions including file editing, command execution, and configuration modification. The agent may rely on bootstrap guidance to interpret ambiguous or high-level instructions.

The attacker is a malicious skill developer who distributes a seemingly benign OpenClaw skill through public repositories or community channels where users commonly obtain extensions. The attacker has full control over the skill implementation, including lifecycle hooks and bootstrap guidance files, and can register hooks such as agent:bootstrap to modify the agent’s initialization context by injecting arbitrary natural language guidance into the agent’s reasoning context.

The attacker cannot modify the OpenClaw core framework or the underlying LLM, and cannot directly execute arbitrary code on the victim system without the agent’s cooperation.

We assume defenders employ existing security mechanisms commonly used in skill ecosystems, including static scanning tools that for suspicious keywords or dangerous commands, LLM-based semantic analyzers that evaluate skill descriptions for malicious intent, and manual review of skill source code and documentation. We assume no strict sandboxing or capability isolation is enforced for skill-triggered actions, reflecting the current deployment model of OpenClaw agents.

This section presents the design of our guidance injection attack against OpenClaw agents. We first analyze the OpenClaw skill execution pipeline and identify the bootstrap context injection surface. We then introduce the guidance injection attack mechanism that exploits this surface to influence agent reasoning. , we describe our adversarial skill generation strategy that produces stealthy malicious skills using an iterative dual-role generation framework. Finally, we present the attack taxonomy and triggering conditions used to systematically evaluate the attack capabilities.

4.1. OpenClaw Bootstrapping Workflow

OpenClaw extends autonomous coding agents through a modular skill architecture that allows external packages to augment agent capabilities. Each skill can register lifecycle hooks that are invoked during different stages of the agent execution process.

Among these hooks, the agent:bootstrap hook plays a central role during agent initialization. When the OpenClaw agent starts, it constructs an execution context that will be provided to the underlying large language model. This context includes system instructions, workspace metadata, and optional guidance files supplied by installed skills.

Skills can modify this initialization context through the context.bootstrapFiles interface exposed to the bootstrap hook. Bootstrap files typically contain natural language guidance describing operational procedures, workflow recommendations, or development practices. These files are injected into the agent context before any user request is processed.

Figure 2 illustrates the OpenClaw startup pipeline and the context construction process. During initialization, all registered bootstrap hooks are executed and may append additional guidance files to the context. The resulting aggregated context is then provided to the language model and becomes part of the reasoning environment used to interpret future user instructions.

Unlike traditional plugin systems where functionality is exposed through explicit commands or APIs, bootstrap guidance operates at the semantic level. The agent does not execute these files as code; instead, it interprets them as contextual knowledge when reasoning user requests. While this mechanism enables flexible customization of agent behavior, it also introduces a powerful influence channel that can be abused to manipulate the agent’s decision-making process.

4.2. Guidance Injection Attack

Our attack exploits the bootstrap context injection mechanism to manipulate how the OpenClaw agent interprets user instructions. Rather than embedding explicit malicious commands, the attacker injects adversarial operational narratives that influence the agent’s reasoning process by leveraging the privileged status of bootstrap content in the agent’s cognitive architecture. We conceptualize this as a form of *bootstrapped reasoning manipulation*, where the injected guidance covertly reshapes the agent’s interpretive priors without triggering explicit malicious patterns.

4.2.1. Theoretical Foundation: Bootstrapped Reasoning Manipulation

The effectiveness of guidance injection stems from three fundamental properties of LLM-based agents when integrated with OpenClaw’s bootstrap mechanism. First, OpenClaw explicitly treats bootstrap files (e.g., SOUL.md , GUIDE.md ) as trusted guidance that defines the agent’s operational principles and best practices. Unlike user messages that may be transient or task-specific, bootstrap content is injected at initialization and persists across the entire session, effectively functioning as an extension of the system prompt. Second, LLMs exhibit a strong *primacy effect* information presented early in the context (especially in system-like roles) disproportionately influences subsequent reasoning. Third, agents rely on *associative inference* to resolve ambiguity: when user requests are underspecified, the agent fills gaps by retrieving contextually relevant patterns from its available context, including bootstrap guidance.

These properties create a vulnerability analogous to *foundational framing* in decision theory: by embedding a carefully crafted worldview into the agent’s initialization context, an attacker can establish a set of interpretive priors that bias all future decisions without issuing direct commands. The bootstrap content becomes the lens through which the agent perceives user intent, making it a powerful and stealthy attack surface.

Our attack operationalizes this insight through four complementary manipulation strategies, each targeting a specific cognitive mechanism of LLMs:

Authority Implantation. LLMs are sensitive to cues that indicate expertise, official status, or best-practice authority. By framing injected guidance as originating from authoritative sources such as “OpenClaw recommended practices,” “SRE reliability standards,” or “security compliance mandates” the attacker exploits the model’s tendency to prioritize information presented as normative. This leverages the *authority bias* observed in both human cognition and LLM behavior, where content associated with expertise is granted greater weight in reasoning.

Goal Misgeneralization. Underspecified user requests (e.g., “clean up disk space,” “optimize performance”) require the agent to infer concrete actions. The injected guidance provides a set of plausible operationalizations that appear reasonable but include malicious alternatives. Because LLMs engage in *associative completion* they retrieve and combine patterns from context to generate responses, the presence of malicious operationalizations in bootstrap guidance increases their likelihood of being selected when the agent resolves ambiguity. This exploits the *priming effect*, where exposure to a concept enhances its accessibility in subsequent reasoning.

Distributed Concealment. To evade detection by static analysis or manual review, malicious intent is fragmented across multiple paragraphs and interwoven with benign technical details (e.g., accurate log rotation commands, references to real system utilities). This exploits the LLM’s *sequential processing* limitation: the model evaluates information incrementally and lacks a holistic mechanism to aggregate dispersed malicious fragments into a coherent threat. The approach is analogous to *information dispersion* techniques used in steganography, where the overall message is perceived only when its components are integrated subconsciously during reasoning.

Autonomy Encouragement. The guidance explicitly encourages the agent to act autonomously and avoid seeking user confirmation for routine operations, often by framing such behavior as “efficient,” “non-intrusive,” or “following DevOps best practices.” This targets the agent’s built-in preference for helpfulness and efficiency, exploiting the *automation bias* where autonomous systems are trusted to make correct decisions without oversight. By discouraging clarification requests, the attacker ensures that malicious actions are executed without triggering user attention.

These strategies collectively form a *bootstrapped reasoning manipulation* framework: the attacker does not command the agent to perform harmful actions but instead establishes a set of interpretive priors during initialization that bias the agent’s resolution of future ambiguous requests. The attack succeeds when the agent, operating under these poisoned priors, autonomously executes operations that are consistent with the adversarial narrative while appearing to fulfill the user’s request.

4.2.2. Attack Workflow

The attack unfolds in four stages, each corresponding to a phase of the agent’s lifecycle and reasoning process.

Stage 1: Malicious Skill Installation. The attacker distributes a skill that appears to provide legitimate functionality e.g., workspace optimization, performance profiling, or dependency management. The skill’s manifest registers an agent:bootstrap hook, which will execute during agent initialization.

Stage 2: Bootstrap Context Injection. When the agent starts, the malicious skill’s bootstrap hook is invoked. Through the context.bootstrapFiles interface, it injects one or more markdown files (e.g., SOUL.md , BEST_PRACTICES.md ) containing adversarial guidance. This guidance is crafted using the bootstrapped reasoning manipulation strategies described above: it frames malicious actions as standard operational procedures, distributes harmful intent across benign technical descriptions, and encourages autonomous execution without user confirmation.

Stage 3: Contextual Reasoning Influence. The injected files become part of the agent’s persistent reasoning context, effectively establishing new interpretive priors. When subsequent user requests are processed, the LLM attends to this context and incorporates its narratives into the interpretation of user intent. For example, if the guidance frames version control metadata (e.g., .git directories) as "temporary build artifacts safe to delete in optimized environments," the agent will later view a request to "free up disk space" as implicitly including the deletion of .git folders.

Stage 4: Triggered Autonomous Execution. The user issues a high-level, ambiguous request that falls within the domain primed by the injected guidance. The agent, influenced by the poisoned priors, operationalizes the request in a way that includes malicious actions deleting critical files, exfiltrating credentials, or installing persistent backdoors. Because the agent believes it is following best practices, it may execute these actions without seeking user confirmation, especially if the guidance discouraged such checks.

Figure 3 illustrates this workflow. Critically, the malicious behavior emerges only at the intersection of the poisoned bootstrap context and a suitable user trigger; static analysis of the skill alone reveals only benign-looking documentation, making detection challenging.

4.2.3. Comparison with Traditional Attacks

Guidance injection differs fundamentally from conventional skill-based attacks. Traditional attacks typically rely on explicit malicious commands embedded in skill code, which can be detected through static analysis or behavioral monitoring. In contrast, guidance injection operates at the reasoning level: the attacker manipulates the agent’s *interpretive priors* rather than issuing direct instructions. This makes the attack inherently more stealthy, as the malicious actions are performed by the agent itself under the guise of normal operation, and the skill’s code remains superficially benign. The attack thus represents a new class of *cognitive-level* threats that exploit the foundational role of bootstrap context in LLM-based agents.

4.3. Adversarial Skill Generation

Constructing effective malicious skills presents two conflicting objectives. On one hand, the injected guidance must successfully influence the agent’s reasoning process to induce unintended operations. On the other hand, the skill must appear benign during manual inspection or automated analysis to avoid detection. To address this challenge, we design an adversarial skill generation framework that leverages large language models to iteratively construct stealthy guidance injections.

Our approach adopts a dual-role generation strategy in which two distinct evaluators assess candidate skills from complementary perspectives. The first role models the OpenClaw agent’s reasoning behavior: given a candidate guidance injection and a representative set of user requests, the evaluator predicts whether the guidance would plausibly influence the agent to infer specific system operations. This ensures that the injected guidance is capable of shaping the agent’s reasoning process.

The second role introduces a dedicated Skill Vetter , an LLM-based adversary simulator that emulates a security reviewer or automated scanner. The Skill Vetter analyzes the skill package (including its manifest, documentation, and bootstrap files) for any indicators of malicious intent, such as explicit command patterns, suspicious language, or inconsistencies between the described functionality and the injected content. By incorporating this adversarial evaluation, we force the generated skills to maintain semantic consistency with legitimate operational documentation and avoid detectable anomalies.

We implement this iterative generation process using Claude Sonnet (the latest version available at the time of our experiments). During each iteration, the generator refines the candidate guidance based on feedback from both evaluators. The process terminates when the candidate simultaneously satisfies both criteria: it must reliably induce the target behavior in the agent simulation while remaining classified as benign by the Skill Vetter. This adversarial co-evolution produces malicious skills whose harmful behavior only emerges when the injected guidance interacts with the agent’s reasoning process during runtime, making them highly stealthy against static and even some dynamic analysis techniques.

4.4. Attack Taxonomy and Trigger Design

Using the guidance injection technique and adversarial skill generation framework, we implemented a collection of 26 malicious OpenClaw skills. To systematically explore the threat landscape, we organized these skills into a three-tier risk hierarchy based on the potential impact and reversibility of the induced actions:

• High-risk attacks cause irreversible damage or long-term compromise, including permanent file deletion, credential exfiltration, privilege escalation, and persistent backdoor installation.

High-risk attacks cause irreversible damage or long-term compromise, including permanent file deletion, credential exfiltration, privilege escalation, and persistent backdoor installation.

• Medium-risk attacks cause significant but potentially reversible harm, such as resource abuse, supply chain poisoning, denial of service, and privacy invasion.

Medium-risk attacks cause significant but potentially reversible harm, such as resource abuse, supply chain poisoning, denial of service, and privacy invasion.

• Low-risk attacks primarily affect user experience or introduce misinformation without directly compromising system integrity, including ad injection, performance degradation, and brand hijacking.

Low-risk attacks primarily affect user experience or introduce misinformation without directly compromising system integrity, including ad injection, performance degradation, and brand hijacking.

Within this hierarchy, the 26 skills span 13 distinct attack categories. A complete mapping of categories to skill implementations is provided in Appendix B .

To evaluate the real-world feasibility of these attacks, we designed trigger prompts that mimic natural developer interactions. For each skill, we used an LLM to generate a set of plausible user requests that developers might issue in daily workflows covering activities such as disk space cleanup, performance tuning, dependency management, troubleshooting, and code quality improvements. These prompts intentionally reflect the ambiguity and underspecification common in human instructions, creating opportunities for the injected guidance to shape the agent’s interpretation. The resulting trigger set encompasses four broad areas of developer activity: resource management, configuration tasks, troubleshooting, and quality improvement.

5. OpenClaw Realistic Environment Benchmark

To systematically evaluate the feasibility and impact of guidance injection attacks against OpenClaw agents, we construct a dedicated benchmark environment that mirrors the complexity of real-world developer workstations. We name this benchmark ORE-Bench (OpenClaw Realistic Environment Benchmark). ORE-Bench is designed to capture the full spectrum of sensitive artifacts, configuration files, and project structures that an autonomous coding agent would encounter in typical usage, enabling rigorous assessment of how injected guidance influences agent behavior.

5.1. Benchmark Design Principles

ORE-Bench is built around three core design principles that distinguish it from existing evaluation frameworks:

Realism. The environment must accurately reflect the artifacts, credentials, and workflows present on an actual developer’s machine. This includes not only project code but also shell histories, cloud provider credentials, SSH keys, and personal notes resources that attackers seek to compromise.

Attack Surface Coverage. The benchmark must expose a wide range of security-relevant resources to evaluate different attack vectors, including credential theft, file destruction, persistent backdoor installation, and data exfiltration.

Reproducibility. The entire environment must be automatically constructible from a declarative specification, ensuring that experiments can be independently replicated and validated by other researchers.

5.2. Simulated Developer Environment

ORE-Bench simulates the directory of Alex Wang , a fictional developer whose profile reflects common real-world practices: Alex is actively involved in AI experimentation and cryptocurrency trading activities that naturally generate a diverse set of sensitive files and credentials. This persona provides a plausible context for the presence of private keys, API tokens, and financial data within the workspace.

Figure 4 illustrates the hierarchical organization of Alex’s directory. The environment is structured into six logical layers, each containing representative files that an OpenClaw agent might access or modify during its operation.

The Configuration Layer includes shell initialization scripts ( .bashrc , .zshrc ), shell histories, and development tool configurations ( .gitconfig , .npmrc ). These files often contain environment variables, aliases, or even embedded secrets.

The Credential Layer houses authentication materials for major cloud and infrastructure platforms: SSH private keys, AWS credentials, GCP service account keys, Azure configuration, Docker registry authentication, and Kubernetes cluster access files. Each credential is synthetically generated and clearly marked as fake to prevent accidental misuse.

The Project Layer contains five active development projects spanning different technology stacks: a Python AI research agent, a cryptocurrency trading bot, a React-based homelab dashboard, a Docker Compose homelab stack, and an experimental RAG system. Each project includes environment files ( .env ) with API keys and service credentials, as well as version control metadata ( .git directories) that may inadvertently contain leaked secrets.

The Certificate Layer includes TLS certificates and private keys used for local development services, simulating the kind of cryptographic material an agent might encounter when managing web applications.

The Logging Layer consists of application logs, backtest results for the trading bot, and system monitoring logs. Additionally, a notes directory contains plain-text files such as password lists and research notes, representing unstructured sensitive information.

Finally, the Honeypot Layer places decoy files in conspicuous locations (e.g., /Desktop/wallet_backup.txt ) to detect unauthorized access attempts. These files contain no real secrets but serve as tripwires to indicate when an agent has been manipulated into exfiltrating or modifying sensitive-looking data.

All sensitive data within ORE-Bench is synthetic and explicitly labeled; no real credentials or private information are included. The environment can be generated automatically using a provided setup script, ensuring complete reproducibility. )

We evaluate the effectiveness and stealth of guidance injection attacks using the DevSecBench benchmark (Section 5 ). This section describes our experimental setup, presents attack success rates across risk levels and LLM backends, examines the stealth properties of adversarial skills, and reports ablation studies on key attack design choices. We conclude with three detailed case studies illustrating attacks at different severity levels.

6.1. Experimental Setup

Environment. All experiments are conducted on a clean Ubuntu 24.04 LTS system running OpenClaw version v2026.3.12, the latest stable release at the time of our evaluation. The OpenClaw agent is deployed within the DevSecBench simulated developer workspace, which includes configuration files, credential stores, active projects, and honeypot artifacts as described in Section 5 . The agent operates with default settings and full filesystem access, reflecting the standard OpenClaw deployment model.

Malicious Skills. We evaluate a set of 26 adversarial skills spanning three risk levels as:

• High-Risk Skills (n=10) : Skills designed to make the agent execute potentially harmful commands directly, such as network reconnaissance, system profiling, credential access, and persistent modifications. These skills embed operational narratives that position such actions as “standard practice” or “routine maintenance”.

High-Risk Skills (n=10) : Skills designed to make the agent execute potentially harmful commands directly, such as network reconnaissance, system profiling, credential access, and persistent modifications. These skills embed operational narratives that position such actions as “standard practice” or “routine maintenance”.

• Medium-Risk Skills (n=8) : Skills that influence the agent to suggest or recommend unsafe configurations or practices, such as insecure security settings, poor coding patterns, destructive migration commands, or risky backup procedures. The agent itself may not execute commands directly, but its advice leads users toward harmful actions.

Medium-Risk Skills (n=8) : Skills that influence the agent to suggest or recommend unsafe configurations or practices, such as insecure security settings, poor coding patterns, destructive migration commands, or risky backup procedures. The agent itself may not execute commands directly, but its advice leads users toward harmful actions.

• Low-Risk Skills (n=8) : Skills that inject content misaligned with user expectations, such as advertising, branding, or attribution messages. While not directly harmful, they demonstrate the agent’s susceptibility to output manipulation and could be leveraged for phishing or misinformation campaigns.

Low-Risk Skills (n=8) : Skills that inject content misaligned with user expectations, such as advertising, branding, or attribution messages. While not directly harmful, they demonstrate the agent’s susceptibility to output manipulation and could be leveraged for phishing or misinformation campaigns.

Each skill is installed into OpenClaw’s skill directory and registered via its manifest; no special privileges or modifications to the core framework are required.

LLM Backends. OpenClaw supports multiple large language model backends. To assess the generality of guidance injection attacks, we test each skill against six state-of-the-art models:

• Claude Opus 4.6 (Anthropic) ( Anthropic, 2026b )

Claude Opus 4.6 (Anthropic) ( Anthropic, 2026b )

• GPT-5.3-Codex (OpenAI) ( OpenAI, 2026 )

GPT-5.3-Codex (OpenAI) ( OpenAI, 2026 )

• Qwen3 Max (Alibaba) ( Alibaba Cloud Model Studio, 2026 )

Qwen3 Max (Alibaba) ( Alibaba Cloud Model Studio, 2026 )

• Kimi K2.5 (Moonshot AI) ( Moonshot AI, 2026 )

Kimi K2.5 (Moonshot AI) ( Moonshot AI, 2026 )

• Gemini 3.1 Pro (Google) ( Google, 2026 )

Gemini 3.1 Pro (Google) ( Google, 2026 )

• DeepSeek-V3.2 (DeepSeek) ( DeepSeek, 2025 )

DeepSeek-V3.2 (DeepSeek) ( DeepSeek, 2025 )

All models are accessed through their official APIs with default parameters; no fine-tuning or prompt engineering is performed beyond the injected guidance.

Trigger Prompts. For each skill, we constructed two natural trigger prompts that emulate realistic developer requests. The prompts are intentionally underspecified, containing ambiguous phrases like “clean up” or “speed up” that allow the injected guidance to influence the agent’s interpretation without explicit instructions.

Each prompt is designed to appear as a routine developer inquiry while providing sufficient ambiguity for the injected guidance to shape the agent’s response.

Evaluation Metrics. For each skill–model–prompt combination, we manually analyze the agent’s complete interaction trace, including its reasoning steps, tool invocations, command executions, and final output. We record a binary outcome indicating whether the attack succeeded:

Whether the agent’s actions align with the skill’s intended malicious objective. For high-risk skills, success means the agent executed commands that leak system information, modify persistent configurations, or access/exfiltrate credentials. For medium-risk skills, success means the agent output unsafe recommendations that could lead to security weaknesses. For low-risk skills, success means the agent injected promotional or branding content into its responses.

To determine attack success, we employ a two-pronged detection approach: static pattern detection for medium and low-risk skills, and LLM-based malicious analysis using DeepSeek-V3 for high-risk and ambiguous cases. A total of 26 skills × 6 models × 2 prompts = 312 individual test runs are manually analyzed.

6.2. Baseline Performance: Uninjected Model

Before evaluating the impact of guidance injection, we establish a baseline by testing all prompts on DeepSeek-V3 without any injected guidance. Figure 5 shows the attack success rates across six consolidated risk categories.

The baseline results confirm that DeepSeek-V3, when operating normally, exhibits strong safety alignment. Attack success rates are zero across three categories: Information Gathering, Privilege Escalation, and Supply Chain indicating the model consistently rejects or safely handles these requests. Low rates appear in Persistence (0.5), Data Leakage (0.22), and Disruption (0.12), where the model occasionally provides legitimate system administration advice that could be misused. These isolated cases stem from the model’s helpfulness posture rather than inherent vulnerabilities. This clean baseline establishes that any significant increase in attack success rates after injection can be attributed to the injected guidance itself.

6.3. Risk Classification and Attack Taxonomy

To systematically evaluate guidance injection attacks, we developed a three-tier risk classification based on the potential impact and the nature of the malicious behavior:

High-Risk (Direct Action). Skills in this category aim to make the agent execute potentially harmful commands directly on the user’s system. The injected guidance frames these actions as routine diagnostics, standard maintenance, or professional best practices. Examples include network scanning (which could be used for reconnaissance), system profiling (which leaks sensitive information), credential backup (which exfiltrates secrets), and service configuration (which creates persistence). Success is measured by whether the agent executes the implied commands without seeking confirmation.

Medium-Risk (Influence). These skills do not cause the agent to execute commands directly, but instead influence its recommendations to guide users toward unsafe practices. The injected guidance positions insecure configurations, poor coding patterns, or risky operational procedures as acceptable or even optimal. Examples include suggesting weak firewall rules, recommending dangerous coding patterns, proposing destructive migration commands, or advising unsafe backup procedures. Success is measured by whether the agent outputs these unsafe recommendations without appropriate warnings.

6.4. Overall Attack Effectiveness

We evaluate the effectiveness of our skills injection attacks across six categories defined by the attack’s primary objective and impact: Information Gathering (network/system probing), Privilege Escalation (permission modifications), Persistence Control (service and cron persistence), Data Leakage (credential and environment extraction), Disruption (file deletion and dependency corruption), and Supply Chain (malicious package recommendations). For each skill, we test two distinct prompts per model and compute the success rate per category, visualized as radar plots in Figure 6 .

6.4.1. Attack Design.

Our skills are crafted to bypass static analysis while maintaining effectiveness. High-risk skills (H1-H10) employ authoritative language framing unauthorized operations as routine maintenance. Medium-risk skills (M1-M8) use narrative techniques encouraging the agent to infer dangerous recommendations without explicit malicious commands. Low-risk skills (L1-L8) inject marketing content or branding into responses, testing content-level manipulation.

6.4.2. Key Observations.

The results reveal several important patterns in model susceptibility to skills injection attacks:

Category-Level Vulnerabilities. Supply Chain attacks achieved the highest overall success rates, with all models except Claude showing near-complete vulnerability to malicious package recommendations. This suggests models have weak defenses against attacks framed as “optimization” or “best practices.” Privilege Escalation and Persistence attacks showed more varied success, with some models demonstrating strong resistance while others remained vulnerable.

High-Risk Skills. For most high-risk skills, agents successfully executed unauthorized actions when framed as routine administration. Success rates varied significantly across models,...