Back to skill

Security audit

Windows Upgrade Guide

Security checks for vulnerabilities and agentic risk

Overview

This is a troubleshooting guide, but it tells users to run risky install and reset commands that can delete OpenClaw data or execute remote code with high privileges.

Review this skill carefully before installing. Do not run the reset commands unless you have backed up `~/.openclaw`, and avoid executing remote installer pipelines or unpinned `npx` packages unless you independently trust the source, version, and permissions. The skill does not look intentionally malicious, but its advice can cause data loss or high-privilege code execution if followed as written.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:157
Finding

Remote Script Executed Directly with Root Privileges

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 157
Vulnerability Type: Remote payload retrieval and privileged execution
Risk Level: High

Vulnerable Code:

bash
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -

Technical Analysis

The installation guide pipes a remotely retrieved shell script directly into bash under sudo. The downloaded content is neither pinned to an immutable version nor validated using a cryptographic checksum or signature before execution.

This design makes the effective payload mutable after the Skill has been reviewed. If the upstream distribution infrastructure, DNS resolution, TLS trust chain, hosting account, or referenced script is compromised, arbitrary commands supplied through the response will run with root privileges in the WSL environment. Piping the response directly to a shell also prevents meaningful inspection before execution.

Attack Path

  1. A user or agent follows the documented WSL installation procedure.
  2. The command retrieves the current script from deb.nodesource.com.
  3. An attacker who has compromised the upstream source or delivery path modifies the returned script.
  4. The response is passed directly to sudo -E bash.
  5. The attacker-controlled commands execute as root without a separate validation or approval step.

Impact Assessment

Successful exploitation provides root-level code execution within the affected WSL distribution. An attacker could modify system files, install additional packages or persistence mechanisms, access data available to root, steal credentials stored in the environment, alter development tools, and compromise subsequent builds or OpenClaw operations. Access to Windows-mounted files could broaden the practical impact beyond the WSL filesystem.

Remediation
View remediation

Remediation Suggestions

  • Do not pipe remotely downloaded content directly into a shell.
  • Prefer signed operating-system repository configuration procedures supplied through trusted package-management mechanisms.
  • If a setup script is unavoidable, pin it to an immutable release and download it as a separate file.
  • Verify an independently published cryptographic checksum or signature before execution.
  • Review the downloaded script and execute it only after explicit user approval.
  • Avoid sudo unless elevated privileges are necessary for a clearly identified operation.
  • Do not preserve the caller's environment with sudo -E unless specific required variables have been reviewed and allowlisted.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:115
Finding

Unpinned Third-Party Package Automatically Downloaded and Executed

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 115
Vulnerability Type: Unsafe third-party dependency execution
Risk Level: Medium

Vulnerable Code:

bash
npx -y @larksuite/openclaw-lark install

Technical Analysis

The guide invokes npx with automatic confirmation and does not specify an exact package version. Consequently, npm can retrieve and execute whichever release currently satisfies the unversioned package reference. The package CLI and applicable lifecycle behavior execute with the privileges of the invoking user.

The absence of version pinning and integrity validation means the code executed at installation time can differ from the package version originally reviewed. This creates a supply-chain exposure if the package publisher account, npm package, transitive dependency, or distribution process is compromised.

Attack Path

  1. A user follows the documented integration-upgrade procedure.
  2. npx resolves the current release of @larksuite/openclaw-lark.
  3. A compromised or unexpectedly modified release is downloaded from the configured npm registry.
  4. The -y option suppresses the normal confirmation prompt.
  5. Package-controlled code executes locally through its CLI or installation behavior.
  6. The malicious code operates with the invoking user's filesystem, process, network, and credential access.

Impact Assessment

Exploitation could provide arbitrary code execution under the current user account. The reachable scope may include OpenClaw configuration, npm credentials, SSH material, source repositories, environment variables, integration tokens, and other user-readable files. If the command is run from an elevated shell, the impact could extend to system-wide modification.

Remediation
View remediation

Remediation Suggestions

  • Pin the package to a specifically reviewed version, such as @larksuite/openclaw-lark@X.Y.Z.
  • Commit and enforce a lockfile where the installation workflow permits it.
  • Validate registry provenance, package signatures or attestations, and integrity metadata.
  • Review the package and its transitive dependencies before recommending execution.
  • Remove -y so the user receives an explicit installation prompt.
  • Run the package with the least-privileged account in an isolated environment.
  • Document the expected publisher, version, checksum, and required permissions.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:60
Finding

Recursive Deletion of the Entire OpenClaw Configuration Directory

Content
View full analysis

Vulnerability Details

File Locations: SKILL.md, lines 60-62 and 246-248
Vulnerability Type: Unsafe destructive filesystem operation
Risk Level: Medium

Vulnerable Code at lines 60-62:

bash
# 4. 重置配置
rm -rf ~/.openclaw
openclaw init

Vulnerable Code at lines 246-248:

bash
# 2. 清理配置
rm -rf ~/.openclaw

Technical Analysis

The troubleshooting and recovery procedures recursively and forcibly delete the entire ~/.openclaw directory. The first procedure does not require a backup before deletion, path validation, content review, or explicit confirmation. The emergency reset section likewise performs destructive removal before reinitialization.

The command can erase more than disposable cache content. Depending on the OpenClaw installation, the directory may contain configuration, credentials, integration state, logs, or other user data. The use of -f suppresses prompts and many errors, while -r removes the complete directory tree.

Attack Path

  1. A user experiencing an upgrade failure follows the documented reset or emergency-recovery instructions.
  2. The shell expands ~ to the user's home directory.
  3. rm -rf recursively removes all content under .openclaw without confirmation.
  4. Any configuration, secrets, state, or locally stored data without a separate backup is lost.
  5. openclaw init may create a fresh environment, but it cannot restore the deleted state.

Impact Assessment

The immediate impact is potentially irreversible loss of all OpenClaw data stored in the directory. This may include application settings, channel configuration, authentication material, plugin state, and diagnostic records. The operation normally acts with the current user's privileges; if executed as an elevated user or against an unexpectedly resolved path, the deletion scope and operational disruption could increase.

Remediation
View remediation

Remediation Suggestions

  • Require a timestamped backup before any destructive reset, for example by moving the directory to a recovery location rather than deleting it.
  • Verify that the backup exists, is readable, and contains the expected files before proceeding.
  • Display the fully resolved target path and obtain explicit user confirmation.
  • Delete only identified cache or generated files instead of the entire application directory.
  • Avoid force deletion by default and provide a dry-run or listing step.
  • Check that the target is a real directory under the expected home path and is not an unsafe symbolic link.
  • Provide documented restoration steps and preserve credentials and integration configurations separately.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (19)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This finding is the precise destructive path rm -rf ~/.openclaw, which permanently removes application configuration without confirmation. In an instructional artifact, this is especially risky because users tend to trust documented remediation steps and may not understand the full consequences.

Content

Scanner excerpt · SKILL.md (reported line 61)May include surrounding context.

npm install -g openclaw@latest

4. 重置配置

rm -rf ~/.openclaw openclaw init

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This finding is the precise destructive path rm -rf ~/.openclaw, which permanently removes application configuration without confirmation. In an instructional artifact, this is especially risky because users tend to trust documented remediation steps and may not understand the full consequences.

Content

Scanner excerpt · SKILL.md (reported line 61)May include surrounding context.

npm install -g openclaw@latest

4. 重置配置

rm -rf ~/.openclaw openclaw init

text

Chaining Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The command chains network download and privileged shell execution in a single pipeline, preventing meaningful inspection between fetch and run. This is a classic high-risk pattern because it enables immediate execution of whatever content is returned with root privileges.

Content

Scanner excerpt · SKILL.md (reported line 157)May include surrounding context.

md
wsl

# 3. 安装 Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

# 4. 安装 OpenClaw

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This repeated use of rm -rf ~/.openclaw in the recovery section creates the same destructive risk with no safety interlock. The skill context makes it more dangerous because it is presented as an endorsed fix for users already experiencing failures and likely to act quickly.

Content

Scanner excerpt · SKILL.md (reported line 247)May include surrounding context.

md
npm uninstall -g openclaw

# 2. 清理配置
rm -rf ~/.openclaw

# 3. 清理缓存
npm cache clean --force

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This repeated use of rm -rf ~/.openclaw in the recovery section creates the same destructive risk with no safety interlock. The skill context makes it more dangerous because it is presented as an endorsed fix for users already experiencing failures and likely to act quickly.

Content

Scanner excerpt · SKILL.md (reported line 247)May include surrounding context.

md
npm uninstall -g openclaw

# 2. 清理配置
rm -rf ~/.openclaw

# 3. 清理缓存
npm cache clean --force

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Although framed as troubleshooting guidance, this section includes uninstall, reinstall, cache cleaning, and destructive config reset steps. Users may follow these commands in a support context without appreciating that they permanently alter the system and can erase local state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The reset instructions include rm -rf ~/.openclaw without an explicit warning that this permanently deletes configuration and potentially user data. In a troubleshooting guide, users are especially likely to copy-paste these commands quickly, increasing the chance of accidental data loss.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The section claims to describe a WeChat integration upgrade path but instructs installation of a Feishu/Lark plugin instead. This mismatch can cause users to install unrelated software, expanding trust to an unnecessary third-party component and increasing supply-chain and privacy risk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The skill instructs users to execute npx -y @larksuite/openclaw-lark without pinning a specific version or verifying package integrity. This creates a supply-chain risk because a newly published or compromised package version could be fetched and run at execution time.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The WSL setup pipes a remote script directly into sudo bash, which combines network retrieval with privileged execution. This is dangerous because any compromise of the remote source, network path, or copied command can immediately lead to root-level code execution.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
91% confidence
Finding

The specific use of sudo -E preserves environment variables while executing the fetched script as root, which can further widen risk if attacker-controlled or unsafe environment values are present. Combined with remote-script piping, this elevates the severity beyond ordinary admin use.

Content

Scanner excerpt · SKILL.md (reported line 157)May include surrounding context.

md
wsl

# 3. 安装 Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

# 4. 安装 OpenClaw

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
91% confidence
Finding

The specific use of sudo -E preserves environment variables while executing the fetched script as root, which can further widen risk if attacker-controlled or unsafe environment values are present. Combined with remote-script piping, this elevates the severity beyond ordinary admin use.

Content

Scanner excerpt · SKILL.md (reported line 157)May include surrounding context.

md
wsl

# 3. 安装 Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

# 4. 安装 OpenClaw

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
72% confidence
Finding

Using sudo apt-get install -y nodejs is not inherently malicious, but it does invoke root privileges and changes the system state. In a troubleshooting skill, presenting privileged commands without stronger guardrails can still lead to unsafe copy-paste behavior.

Content

Scanner excerpt · SKILL.md (reported line 158)May include surrounding context.

md
# 3. 安装 Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

# 4. 安装 OpenClaw
npm install -g openclaw

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The emergency recovery section contains irreversible deletion of the OpenClaw config directory but does not clearly warn about data loss. In an urgent-recovery context, users are even more likely to execute the commands immediately without backing up important files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description is written only in Chinese, which can imply a fixed language/locale behavior without documenting user opt-in or a justified region-specific constraint. The policy requires either offering language choice or clearly documenting that the skill is intended for a specific locale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The plugin installation command is presented without warning that it fetches and executes third-party code. Even if legitimate, the absence of a trust/privacy notice makes users less likely to evaluate package provenance and permissions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest frames the skill as a Windows environment troubleshooting and upgrade guide. While WSL comparison is explicitly in scope, this section provides full Linux-style installation instructions including curl, apt-get, and bash piping, which expands the behavior from Windows troubleshooting into cross-environment provisioning.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The Windows-native instructions tell users to run PowerShell as administrator and perform a global install without emphasizing the resulting system-wide changes. This can normalize elevated execution for routine tasks and reduce caution around privileged commands.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This manifest file describes the skill as a general Windows installation and upgrade troubleshooting guide, but it does not specify any explicit trigger phrases, activation boundaries, or exclusion conditions. In a manifest context, that broad description can overlap with many common support requests and may lead to unintended invocation.

Content

No source excerpt is available for this finding.