Back to skill

Security audit

OpenClaw Setup (ModelWise)

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly an OpenClaw setup guide, but its examples and troubleshooting steps could expose an assistant to untrusted users or delete local OpenClaw data without adequate warnings.

Review and tighten the configuration before installing: bind the gateway to 127.0.0.1 unless you intentionally need LAN access, use Telegram pairing or an explicit allowlist instead of open wildcard access, avoid pipe-to-shell installers when possible, pin package versions, and do not run the reset commands unless you have a full backup outside ~/.openclaw.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (6)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:58
Finding
Remote installer is downloaded and executed without integrity verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 58-60 **Vulnerability Type**: Remote code execution through mutable external content **Risk Level**: High ### Vulnerable Code ```bash # Install nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash ``` ### Technical Analysis The installation instructions pipe an HTTP response directly into `bash`. Although the URL points to the established `nvm-sh/nvm` GitHub repository and the referenced version is fixed in the path, the downloaded bytes are not authenticated with a checksum or cryptographic signature before execution. The effective code executed on the user's machine can therefore differ from the content reviewed in this project. A compromise of the upstream repository, hosting account, content-delivery path, or certificate trust environment could turn this command into arbitrary shell execution. Installing Node.js is relevant to the Skill, but immediate remote-to-shell execution is not the minimum privilege or safest mechanism necessary to achieve that purpose. ### Attack Path 1. An attacker compromises the upstream repository, release content, hosting account, or another trusted part of the delivery path. 2. The response for `install.sh` is replaced with attacker-controlled shell code. 3. A user follows the Skill instructions and runs the command. 4. `curl` writes the attacker-controlled response directly to standard output. 5. `bash` executes it immediately with the user's permissions and without an inspection or integrity-verification step. 6. The payload can modify user files, establish persistence, steal accessible credentials, or install further payloads. ### Impact Assessment Successful exploitation provides arbitrary command execution with the privileges of the user running the installation command. This normally includes access to the user's home directory and may include OpenClaw configuration, sessions, browser profiles, workspace data, an ...[truncated 121 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not pipe downloaded content directly into a shell. 2. Prefer installation through an operating-system package manager or a documented official installer with signature verification. 3. If a shell installer is required: - Download it to a local file. - Obtain the expected SHA-256 digest from a separately authenticated source. - Verify the digest before execution. - Allow the user to inspect the file. - Execute it only after successful verification. 4. Pin a reviewed immutable commit or signed release rather than relying only on a tag path. 5. Document that the installer must not be run as root unless upstream installation explicitly requires it. A safer pattern is: ```bash curl --fail --show-error --location \ --output /tmp/nvm-install.sh \ https://raw.githubusercontent.com/nvm-sh/nvm/<reviewed-commit>/install.sh printf '%s %s\n' '<EXPECTED_SHA256>' '/tmp/nvm-install.sh' | sha256sum --check - bash /tmp/nvm-install.sh rm -- /tmp/nvm-install.sh ``` ]]>

T08 · Insecure Dependencies

Warning
Location
publish.sh:16
Finding
Global npm installations use mutable or unspecified dependency versions<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md`, lines 74-80 and 339-342 - `publish.sh`, lines 16-20 - `scripts/check-installation.sh`, lines 68-72, 182-190 **Vulnerability Type**: Unpinned third-party packages with global lifecycle-script execution **Risk Level**: Medium ### Vulnerable Code `SKILL.md`: ```bash # All platforms npm install -g openclaw@latest # Verify installation openclaw --version ``` `publish.sh`: ```bash # Check if clawhub is installed if ! command -v clawhub &> /dev/null; then echo "📦 Installing clawhub CLI..." npm i -g clawhub fi ``` `scripts/check-installation.sh` recommends the same mutable installation: ```bash echo " Install: npm install -g openclaw@latest" ``` ### Technical Analysis `openclaw@latest` resolves a mutable distribution tag, while `clawhub` is installed without any explicit version. Consequently, users may install package content that did not exist when this Skill was reviewed. npm installation can execute package lifecycle scripts, and global installation makes the resulting executable available system-wide for the current npm prefix. The publishing script also installs `clawhub` automatically when it is absent. This combines dependency retrieval and execution with a publishing workflow that has access to an authenticated ClawHub session. No evidence shows that either named package is malicious; the vulnerability is the avoidable supply-chain exposure caused by mutable resolution and automatic global installation. ### Attack Path 1. An attacker compromises a package maintainer or npm publishing token, or a malicious release is otherwise assigned to the `latest` tag. 2. The user follows the Skill instructions or runs `publish.sh`. 3. npm resolves the current mutable package version and downloads it. 4. npm executes any applicable lifecycle scripts with the user's permissions. 5. A malicious package can access local files and environment data; during publishing, it may also target C ...[truncated 453 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin reviewed package versions, for example `openclaw@<exact-version>` and `clawhub@<exact-version>`. 2. Document the expected package publisher, package digest or registry integrity information, and the review date. 3. Do not automatically install publishing tools from inside `publish.sh`. Exit with a clear prerequisite message instead. 4. Require users to install and verify the publishing CLI separately before it is used with an authenticated session. 5. Prefer project-local development dependencies and locked dependency graphs over global installation where supported. 6. Review lifecycle scripts before installation, and consider `--ignore-scripts` where package operation does not require them. 7. Use a trusted, explicitly configured npm registry and enable account protections such as MFA for package publishers. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
examples/openclaw.json:4
Finding
Example configuration exposes the gateway and Agent to untrusted users<![CDATA[ ## Vulnerability Details **File Locations**: - `examples/openclaw.json`, lines 4-10 and 62-68 - `SKILL.md`, lines 143-149 and 162-168 - `references/configuration-reference.md`, lines 24-34 and 171-178 - `examples/telegram-setup.md`, lines 40-48 and 80-86 **Vulnerability Type**: Insecure network binding and unrestricted message authorization **Risk Level**: High ### Vulnerable Code `examples/openclaw.json`: ```json5 gateway: { enabled: true, port: 18789, mode: "local", bind: "0.0.0.0", auth: { mode: "token" } }, ``` ```json5 telegram: { enabled: true, botToken: "${TELEGRAM_BOT_TOKEN}", dmPolicy: "open", streaming: "partial", allowFrom: ["*"] }, ``` The primary Skill example similarly recommends: ```json5 gateway: { enabled: true, port: 18789, mode: "local", bind: "0.0.0.0" }, ``` ```json5 telegram: { enabled: true, botToken: "YOUR_BOT_TOKEN", dmPolicy: "open", streaming: "partial" } ``` ### Technical Analysis Binding the gateway to `0.0.0.0` makes it listen on every available network interface rather than only the loopback interface. Labeling the gateway mode as `"local"` does not itself restrict socket reachability. The bundled Telegram example separately combines `dmPolicy: "open"` with `allowFrom: ["*"]`, explicitly authorizing every Telegram user who can locate the bot. This access policy is broader than necessary for the declared personal-assistant use case. The same example enables Agent capabilities such as memory and browser automation, increasing the consequences of processing messages from untrusted senders. The gateway example specifies token authentication but does not include a generated token in the example, while the shorter primary configuration omits the `auth` block entirely. Whether a missing token prevents startup or produces an insecure deployment depends on OpenClaw's runtime behavior, but the configuration guidance should not rely on undocumented fail-safe behavior. ### Attack P ...[truncated 1201 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Change the default binding to loopback: ```json5 bind: "127.0.0.1" ``` 2. Use pairing mode by default: ```json5 telegram: { enabled: true, dmPolicy: "pairing" } ``` 3. Replace `allowFrom: ["*"]` with an explicit allowlist of trusted Telegram user identifiers. 4. Require a strong, randomly generated gateway token and fail closed if it is absent. 5. Require TLS or a trusted authenticated tunnel before any LAN or remote exposure. 6. Keep browser automation and other powerful tools disabled until explicitly needed. 7. Apply sandboxing and a minimal tool allowlist to sessions reachable through messaging channels. 8. Add rate limits, audit logging, and alerting for pairing and authentication failures. 9. Clearly distinguish a deliberately public bot configuration from the secure default and include a warning about prompt injection and model-cost abuse. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
examples/telegram-setup.md:198
Finding
Troubleshooting guidance may print a Telegram bot credential<![CDATA[ ## Vulnerability Details **File Location**: `examples/telegram-setup.md`, lines 198-201 **Vulnerability Type**: Sensitive credential exposure in terminal output **Risk Level**: Medium ### Vulnerable Code ```bash 2. Check bot token is correct: ```bash openclaw credentials get telegram ``` ``` ### Technical Analysis The guide instructs users to retrieve the Telegram credential as a troubleshooting step. If `openclaw credentials get telegram` returns the stored token rather than a redacted status, the secret is exposed in terminal scrollback and may also be captured by shell-session recording, screen sharing, screenshots, support transcripts, continuous-integration logs, or remote administration tooling. The audit did not execute OpenClaw and therefore does not establish whether the command masks its output. Security documentation should not depend on secret retrieval being redacted unless that behavior is guaranteed and explicitly documented. ### Attack Path 1. A user experiences a Telegram integration problem and follows the troubleshooting guide. 2. The user runs `openclaw credentials get telegram`. 3. The bot token is displayed in the terminal if the CLI returns the raw value. 4. The output is observed or retained through scrollback, screen sharing, logging, screenshots, or support material. 5. An attacker obtains the token and uses it with the Telegram Bot API. 6. The attacker can impersonate or control the bot until the token is revoked. ### Impact Assessment Exposure of the bot token can allow unauthorized use of the Telegram bot identity and API. The attacker may send messages as the bot, receive updates depending on the bot's configured delivery mechanism, disrupt the integration, or redirect bot operation. The impact is limited to the authority granted by the Telegram token but may indirectly expose conversations handled by the bot. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace raw credential retrieval with a command that reports only whether the credential exists. 2. If retrieval is required, ensure the CLI always masks all but a minimal suffix. 3. Recommend testing authentication through a non-secret-revealing health check. 4. Warn users not to paste tokens into support tickets, screenshots, chat conversations, or logs. 5. If a token has been exposed, instruct the user to revoke it through BotFather, create a replacement, update the credential store, and restart the gateway. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:241
Finding
Windows maintenance command terminates every Node.js process<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 241-245 **Vulnerability Type**: Overbroad forced process termination **Risk Level**: Medium ### Vulnerable Code ```powershell # Stop gateway (Windows PowerShell) Stop-Process -Name "node" -Force ``` ### Technical Analysis OpenClaw runs on Node.js, but selecting processes only by the generic executable name `node` does not distinguish the OpenClaw gateway from unrelated Node.js applications. The `-Force` option terminates every matched process without allowing graceful shutdown. This exceeds the minimum authority necessary to stop OpenClaw and can affect development servers, build processes, other Agent services, and production workloads belonging to the same Windows user or any other process the invoking account is authorized to terminate. ### Attack Path 1. A user has OpenClaw and one or more unrelated Node.js applications running. 2. The user follows the maintenance instructions to stop the OpenClaw gateway. 3. PowerShell resolves every process whose name is `node`. 4. `Stop-Process` forcibly terminates all matched processes. 5. Unrelated applications experience interruption and may lose in-memory or partially written state. ### Impact Assessment The command can cause denial of service across all Node.js workloads that the current account is permitted to terminate. If run from an elevated PowerShell session, the affected scope may include Node.js services owned by other users or system-level workloads. Forced termination can also corrupt incomplete writes or cause loss of unsaved application state. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Prefer the product-specific stop command, such as `openclaw gateway stop`, if supported. 2. If OpenClaw is installed as a service, stop that named service rather than its runtime executable. 3. Otherwise, record the gateway PID when it starts and terminate only that PID after verifying its command line. 4. Attempt graceful shutdown before forced termination. 5. Display the selected process and ask for confirmation before using `-Force`. For example, filter by an OpenClaw-specific command line and review the result before stopping it rather than selecting all `node` processes. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:324
Finding
Reset procedure recursively deletes credentials and all OpenClaw state<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 324-329 **Vulnerability Type**: Destructive data deletion with incomplete backup **Risk Level**: Medium ### Vulnerable Code ```bash # Backup and reset (macOS/Linux) cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak rm -rf ~/.openclaw openclaw onboard ``` ### Technical Analysis The procedure copies `openclaw.json` into the same directory that is immediately removed. The purported backup is therefore deleted by the next command. Recursive deletion also removes more than configuration: according to the Skill's own directory description, `~/.openclaw/` may contain credentials, sessions, logs, workspace content, custom skills, Agent configuration, canvas data, browser profiles, and memory. A reset may legitimately remove configuration, but deleting the entire data hierarchy without an external backup or explicit warning is not the minimum destructive action necessary. Because `rm -rf` is non-interactive, recovery may be difficult or impossible. ### Attack Path 1. A user follows the documented reset procedure to repair a configuration issue. 2. The configuration file is copied to `~/.openclaw/openclaw.json.bak`. 3. `rm -rf ~/.openclaw` deletes the original file and the backup because both are inside the target directory. 4. Credentials, sessions, logs, workspace files, browser data, memory, and custom skills are deleted along with the configuration. 5. `openclaw onboard` creates a new setup but does not restore the deleted state. ### Impact Assessment The direct impact is loss of all OpenClaw data stored under the user's profile, not merely a configuration reset. This can include irreplaceable session history, Agent memory, browser profiles, custom workspace content, and stored credentials. The command operates with the invoking user's permissions and does not affect files outside `~/.openclaw/` as written. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Back up the entire directory to a destination outside `~/.openclaw/`. 2. Use a timestamped archive and verify that it was created successfully before deleting anything. 3. Explain exactly which data categories will be removed and require explicit user confirmation. 4. Prefer renaming the directory over immediate deletion so rollback remains possible. 5. For a configuration-only reset, remove or rename only `openclaw.json` rather than the complete directory. 6. Preserve credentials, workspace files, custom skills, browser profiles, and memory unless the user explicitly requests a full data wipe. A safer reversible approach is: ```bash backup="$HOME/.openclaw.backup.$(date +%Y%m%d-%H%M%S)" mv -- "$HOME/.openclaw" "$backup" printf 'OpenClaw state moved to: %s\n' "$backup" openclaw onboard ``` ]]>
Vulnerability Patterns
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
There is a clear description-behavior mismatch. The declared purpose says this skill helps users install, configure, and start OpenClaw on their systems. However, the code shown is a publishing utility for distributing a skill to ClawHub. Its primary actions are related to release management and platform publishing: ensuring the clawhub CLI exists, verifying login status, validating skill files, collecting a changelog, and invoking `clawhub publish`. It does not perform OpenClaw installation, configuration, gateway startup, or OS-specific setup tasks. These are materially different purposes, so this should be flagged as a mismatch.

Chaining Abuse

High
Category
Tool Misuse
Content
```bash
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

# Reload shell
source ~/.zshrc  # or ~/.bashrc
Confidence
94% confidence
Finding
Piping `curl` output directly into `bash` combines external content retrieval with immediate execution, eliminating the user's chance to review what will run. In the context of an installation skill, this pattern is especially risky because users are primed to trust and copy-paste setup commands verbatim.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
# Backup and reset (macOS/Linux)
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
rm -rf ~/.openclaw
openclaw onboard

# Backup and reset (Windows PowerShell)
Confidence
95% confidence
Finding
`rm -rf ~/.openclaw` irreversibly removes the entire OpenClaw state directory, including credentials, sessions, logs, workspace, and possibly custom skills or memory data. In a troubleshooting guide, destructive recursive deletion is dangerous because users may execute it quickly under stress without understanding the blast radius.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
# Backup and reset (macOS/Linux)
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
rm -rf ~/.openclaw
openclaw onboard

# Backup and reset (Windows PowerShell)
Confidence
95% confidence
Finding
`rm -rf ~/.openclaw` irreversibly removes the entire OpenClaw state directory, including credentials, sessions, logs, workspace, and possibly custom skills or memory data. In a troubleshooting guide, destructive recursive deletion is dangerous because users may execute it quickly under stress without understanding the blast radius.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The troubleshooting guidance recommends `kill -9 <PID>`, `killall`, `Stop-Process`, and `taskkill /F` style force termination without warning that this may abruptly stop the gateway or other unrelated Node-based processes. Abrupt termination can cause data corruption, lost logs, and service interruption, especially where process matching is broad.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**3. Permission denied:**
```bash
# macOS/Linux
sudo chown -R $(whoami) ~/.npm

# Windows (run PowerShell as Administrator)
npm cache clean --force
Confidence
76% confidence
Finding
The guide tells users to run `sudo chown -R $(whoami) ~/.npm`, which performs a recursive privileged ownership change. While often used to fix npm permission issues, privileged recursive filesystem operations can unintentionally alter permissions more broadly than needed and normalize unsafe use of sudo in setup documentation.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The reset instructions delete the entire `~/.openclaw` or `%USERPROFILE%\.openclaw` directory, which can erase credentials, sessions, logs, workspace data, and other state. Because the guide presents this as routine troubleshooting without a prominent data-loss warning or narrower alternatives, users may irreversibly destroy important local data.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The example configuration exposes the gateway on 0.0.0.0 and also enables a Telegram interface with permissive defaults, creating remotely reachable control surfaces rather than a narrowly scoped local setup example. In an installation/setup skill, shipping an example that normalizes broad network exposure can lead users to deploy an unnecessarily accessible agent service without understanding the security implications.

External Transmission

Medium
Category
Data Exfiltration
Content
]
      },
      openai: {
        baseUrl: "https://api.openai.com/v1",
        apiKey: "${OPENAI_API_KEY}",
        models: [
          { id: "gpt-5.2", name: "GPT-5.2", contextWindow: 128000 },
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
]
      },
      openai: {
        baseUrl: "https://api.openai.com/v1",
        apiKey: "${OPENAI_API_KEY}",
        models: [
          { id: "gpt-5.2", name: "GPT-5.2", contextWindow: 128000 },
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The Telegram bot interface is enabled with dmPolicy set to open and allowFrom set to ["*"], which effectively permits interaction from any sender. That creates an unnecessary remote command/input channel for an agent setup example and increases the chance of unauthorized use, abuse, or prompt-driven actions through the bot interface.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The file combines credential-based integration (Telegram bot token and API keys via environment variables) with an openly reachable inbound messaging configuration, but provides no visible warning about exposure, abuse, or secret-handling expectations. While the secrets themselves are placeholders, the example may encourage unsafe deployment patterns where operators enable remote access without appreciating the consequences.

Vague Triggers

Medium
Confidence
99% confidence
Finding
Using allowFrom: ["*"] is overly permissive access control because it authorizes messages from any sender instead of an approved allowlist. If the bot can trigger agent behaviors, an attacker or random third party could interact with the system and potentially cause data exposure, unwanted actions, or service misuse.

Session Persistence

Medium
Category
Rogue Agent
Content
Complete guide to set up Telegram integration with OpenClaw.

## Step 1: Create Telegram Bot

1. Open Telegram and search for **@BotFather**
2. Send `/newbot` command
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The guide presents a public bot configuration using `dmPolicy: "open"` and `allowFrom: ["*"]` without a clear warning that this exposes the bot to messages from any Telegram user. In the context of an AI gateway, this can lead to unauthorized interaction, privacy issues, abuse, and unexpected cost or data exposure if the bot is connected to internal capabilities.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The always-active group configuration instructs users to set `requireMention: false` and `activation: "always"` but does not warn that the bot will process every message in the group. This increases the risk of inadvertent collection of sensitive group content, noisy triggering, prompt injection from any participant, and elevated operational cost.

External Script Fetching

Low
Category
Supply Chain
Content
```bash
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

# Reload shell
source ~/.zshrc  # or ~/.bashrc
Confidence
93% confidence
Finding
The command fetches a remote script and pipes it directly into `bash`, executing network-retrieved code without inspection or integrity verification. If the remote content, transport path, or upstream repository is compromised, users can execute attacker-controlled code immediately on their system.

Static analysis

No suspicious patterns detected.