Back to skill

Security audit

Openclaw Research Tool

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed web-research helper that uses OpenRouter, with ordinary integration risks around installing and running an external CLI.

Install only if you are comfortable using an external Cargo-installed CLI with your OpenRouter API key. Prefer a pinned or reviewed version when possible, set spending limits on the API key, and pass research queries through safe argument handling or --stdin instead of constructing shell commands from untrusted text.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:40
Finding
Shell Command Injection Through Unsafe Research Query Interpolation## Vulnerability Details **File Location**: `SKILL.md`, lines 40–44 **Vulnerability Type**: Command injection through unsafe shell-string construction **Risk Level**: High **Vulnerable Code**: ```python # Best: run in a sub-agent (main session stays responsive) sessions_spawn task:"research-tool 'your query here'" # Or via exec — NEVER set timeout, use yieldMs to background: exec command:"research-tool 'your query'" yieldMs:5000 ``` ### Technical Analysis The documented invocation pattern embeds an arbitrary natural-language research query inside a command string delimited by single quotes. It does not require argument-safe invocation, escaping, or input validation. If an agent substitutes attacker-controlled text directly for `your query`, a query containing a single quote can terminate the intended argument. Shell metacharacters can then introduce an additional command. For example, a payload shaped like `' ; attacker_command ; #` could alter the resulting command when the execution interface invokes a shell. The same trust-boundary issue applies to the `sessions_spawn` example because the task is represented as a command-like string. Exploitability there depends on how the spawned agent parses and executes that task. ### Attack Path 1. An attacker supplies or influences a research query processed by the Skill. 2. The agent follows the documented example and inserts the query directly into `research-tool '...'`. 3. The query contains a single quote followed by shell control syntax. 4. The quote closes the intended query argument, and the remaining syntax is interpreted as a separate shell command. 5. The injected command executes with the privileges and environment of the agent process. ### Impact Assessment Successful exploitation could permit arbitrary command execution under the account running the agent. The attacker could read or modify files accessible to that account, invoke local programs, make network ...[truncated 428 chars]
Remediation
## Remediation Suggestions - Pass the executable and user query as separate argument-array elements rather than constructing a shell command string. - Use an execution API that bypasses shell interpretation. - If the platform only accepts command strings, apply robust, platform-specific shell escaping rather than manually surrounding input with quotes. - Treat all research queries as untrusted input and reject control characters or unsupported shell syntax as defense in depth. - Prefer standard input for long or untrusted prompts, such as invoking `research-tool --stdin` through an argument-safe API and supplying the query through a dedicated stdin field. - Add regression tests using quotes, command substitutions, newlines, semicolons, pipes, and redirection operators. - Document explicitly that queries must never be concatenated into executable shell strings.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:25
Finding
Unpinned Cargo Installation Creates a Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, line 25 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium **Vulnerable Code**: ```bash cargo install openclaw-search-tool ``` ### Technical Analysis The installation command retrieves the current registry release of `openclaw-search-tool` without selecting a reviewed version or requiring its published lockfile. Consequently, identical installation instructions may install different code over time. Cargo installation builds package-supplied source code and can execute build scripts during compilation. A compromised publisher account, malicious future release, or compromised transitive dependency could therefore introduce code that executes during installation or whenever the installed command is invoked. The resulting executable is subsequently expected to run in an environment containing `OPENROUTER_API_KEY`. ### Attack Path 1. The package publisher, registry release process, or a dependency used by a future release is compromised. 2. A malicious or otherwise unsafe release becomes the version selected by the unpinned installation command. 3. A user follows the documented `cargo install openclaw-search-tool` instruction. 4. Cargo downloads and builds the newly selected package and its dependencies. 5. Malicious code executes through a build script or is installed as part of the resulting binary. 6. On later invocation, the compromised binary can access the research query, available files, network connectivity, and potentially `OPENROUTER_API_KEY`. ### Impact Assessment A compromised dependency could execute code with the installing user's privileges. It could alter user-accessible files, install a trojanized executable, exfiltrate research content, consume or steal the OpenRouter credential, and issue unauthorized API requests. The maximum scope is determined by the privileges used for installation and execution. Installin ...[truncated 161 chars]
Remediation
## Remediation Suggestions - Pin the dependency to a specific reviewed version, for example: ```bash cargo install openclaw-search-tool --version '<reviewed-version>' --locked ``` - Review the selected release and its transitive dependency lockfile before recommending it. - Document the expected registry or source repository so users can detect package-name spoofing. - Publish and verify release checksums, signatures, or provenance attestations where available. - Run installation and the resulting executable under a dedicated, least-privileged account or sandbox. - Restrict the executable's filesystem and network access to what is required for research. - Rotate `OPENROUTER_API_KEY` promptly if package compromise is suspected, and apply provider-side spending limits and monitoring.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.