Back to skill

Security audit

Openclaw Mutual Repair

Security checks for vulnerabilities and agentic risk

Overview

This skill matches its monitoring and repair purpose, but it exposes powerful remote restart behavior too broadly and includes an exposed publishing token.

Review before installing, especially on any production or reachable network. Do not expose port 9528 publicly. Require the publisher to revoke the published token, add authentication or mutual TLS for heartbeat and repair APIs, bind only to a trusted interface, validate host and port configuration, avoid shell interpolation, add request limits, and make repair actions explicit and reversible.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/index.ts:349
Finding

<![CDATA[Unauthenticated Repair Endpoint Allows Remote Process Restart]]>

Content
View full analysis
body += chunk); req.on('end', async () => { try { const repair: RepairRequest = JSON.parse(body); console.log('[Repair] Received request:', repair); const result = await this.executeRepair(repair); res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ type: 'repair_ack', timestamp: Date.now(), success: true, result })); ``` ```typescript private async executeRepair(repair: RepairRequest) { switch (repair.action) { case 'check': return await checkSystemHealth(); case 'restart': return await this.restartOpenClaw(); case 'diagnose': return await this.diagnoseLocal(); default: throw new Error(`Unknown repair action: ${repair.action}`); } } private async restartOpenClaw() { console.log('[Repair] Restarting OpenClaw...'); try { await execPromise('pm2 restart openclaw'); return { success: true, message: 'OpenClaw restarted' }; } catch (error: any) { try { await execPromise('systemctl restart openclaw'); return { success: true, message: 'OpenClaw restarted via systemd' }; } catch (e: any) { throw new Error('Failed to restart OpenClaw: ' + e.message); } } } ``` ### Technical Analysis The `/api/repair` endpoint accepts repair requests without authenticating the caller, validating the caller against an authorized peer, or checking whether the caller is permitted to invoke a specific repair operation. A TypeScript type annotation does not provide runtime security validation. When the s ...[truncated 1635 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/index.ts:299
Finding

<![CDATA[Shell Command Injection Through Unvalidated Remote Host Configuration]]>

Content
View full analysis
{ return new Promise((resolve, reject) => { const { exec } = require('child_process'); exec(command, (error: any, stdout: string, stderr: string) => { if (error) { reject(error); } else { resolve(stdout); } }); }); } ``` ```typescript remoteHost: config?.remoteHost || '192.168.1.101', remotePort: config?.remotePort || 9528, ``` ### Technical Analysis The configured `remoteHost` and `remotePort` values are interpolated directly into command strings passed to `child_process.exec()`. The `exec()` API evaluates its input through a system shell, so shell metacharacters in either value can terminate or extend the intended command. TypeScript interfaces do not validate runtime values. The implementation does not verify that `remoteHost` is a valid IP address or DNS name, nor that `remotePort` is an integer in the valid TCP port range. The vulnerable commands are reached by remote diagnosis. The service calls this diagnosis logic when it determines that the configured remote node is unavailable. ### Attack Path 1. An attacker gains the ability to influence the skill configuration, deployment settings, o ...[truncated 1045 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
PUBLISH.md:20
Finding

<![CDATA[ClawHub Publication Token Committed in Plaintext]]>

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/index.ts:246
Finding

<![CDATA[Public Default Binding and Plaintext Heartbeat Transport]]>

Content
View full analysis
{ console.log(`[Server] Listening on ${this.config.localHost}:${this.config.localPort}`); }); ``` ### Technical Analysis The default configuration binds the HTTP server to `0.0.0.0`, exposing it on every available network interface. The heartbeat client communicates over unauthenticated plaintext HTTP. The protocol does not provide transport encryption, server authentication, peer authentication, message integrity, or replay protection. An attacker with network access can observe operational telemetry, forge heartbeat data, impersonate a peer, or access the unauthenticated repair endpoint. Although the documentation recommends internal-network use and firewall restrictions, the implementation does not enforce those constraints. Internal networks must not be treated as an authentication boundary. ### Attack Path 1. A user starts the skill with the default `localHost` setting. 2. The service listens on port 9528 on all host interfaces. 3. A network-adjacent or otherwise routable attacker discovers the exposed port. 4. The attacker directly submits forged heartbeat or repair requests. 5. Alternatively, an attacker positioned on the network observes or modifies plaintext heartbeat traffic. 6. Forged heartbeat messages can manipulate remote-health state, while forged repair messages can reach privileged functionality. ### Impact Assessment The exposed service leaks host-health me ...[truncated 428 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/index.ts:323
Finding

<![CDATA[Unbounded HTTP Request Buffering Enables Memory Exhaustion]]>

Content
View full analysis
body += chunk); req.on('end', async () => { ``` ```typescript } else if (req.method === 'POST' && req.url === '/api/repair') { // Handle repair request let body = ''; req.on('data', (chunk: any) => body += chunk); req.on('end', async () => { ``` ### Technical Analysis Both POST handlers concatenate every received chunk into an in-memory string without enforcing a maximum request size. The server also does not show request-body timeouts, per-client limits, or rate limiting. A remote client can stream a very large body or maintain multiple slow requests. Since the body remains buffered until the `end` event, process memory can grow substantially. String concatenation can create additional allocations and garbage-collection pressure. This issue is particularly exposed because the default server configuration listens on all interfaces. ### Attack Path 1. An attacker connects to the service on port 9528. 2. The attacker opens one or more POST requests to `/api/heartbeat` or `/api/repair`. 3. The attacker sends a very large body or continuously streams chunks without ending the request. 4. Each chunk is appended to the in-memory `body` string. 5. Memory consumption and garbage-collection overhead increase. 6. The OpenClaw process becomes slow, runs out of memory, or terminates. ### Impact Assessment Any unauthenticated client able to reach the listener can consume application memory and connections. Successful exploitation can degrade monitoring, interrupt heartbeat handling, or terminate the entire OpenClaw process. The primary impact is denial of service. The affected scope is the Node.js process and any functionality hoste ...[truncated 26 chars]
Remediation
View remediation
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (31)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The publishing instructions embed a live-looking Claw CLI token directly in the document, which is a credential exposure issue. Anyone with access to this file could reuse the token to authenticate and publish, modify, or enumerate account resources, and the lack of any warning normalizes unsafe secret handling.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `src/index.ts` - 核心实现

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `package.json` - 依赖管理

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The /api/repair endpoint accepts unauthenticated network requests and can invoke restart actions that execute shell/system commands such as 'pm2 restart openclaw' and 'systemctl restart openclaw'. Any reachable attacker could trigger service disruption or repeated restarts, and the endpoint lacks authentication, authorization, integrity protection, confirmation, and rate limiting.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The listed trigger keywords are very broad terms like '配置', '优化', '修复', and 'check', which can appear in ordinary conversation and cause unintended skill activation. In an operational repair skill, accidental invocation could lead to unsolicited diagnostics or repair-oriented actions being suggested or initiated in the wrong context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The README explicitly advertises a remote repair capability but does not clearly warn users that it may trigger system-changing actions on another host. In an ops skill that can interact with PM2/systemd and perform remote remediation, missing consent/scope warnings increases the risk of unauthorized or unsafe administrative actions being enabled in production.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 230)May include surrounding context.

md
**解决:**
1. 检查对端 OpenClaw 是否运行
2. 检查防火墙是否开放端口:`sudo ufw allow 9528`
3. 测试连通性:`telnet 192.168.1.101 9528`

### 问题 2:端口被占用

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly advertises automatic remote repair and remote process restarts, which can cause service interruption or unintended changes on another host, but the documentation does not clearly warn users before enabling disruptive actions. In an ops automation skill, this is especially sensitive because users may treat 'repair' as harmless monitoring when it can actually restart production processes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation recommends SSH passwordless login for remote repair without clearly explaining the security implications of establishing unattended remote access. This can normalize broad trust relationships and lead to credential abuse or full remote command execution on the peer host if keys are over-privileged or the source system is compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest explicitly advertises heartbeat monitoring, fault detection, and automatic repair, but provides no user-facing warning that the skill may execute commands or communicate over the network to change system state. In the context of exec and network permissions, this omission is dangerous because users may invoke the skill without understanding that it can perform impactful autonomous actions on local or remote hosts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list includes very generic terms such as "health," "status," "monitor," and their Chinese equivalents, which could activate the skill during ordinary conversations unrelated to system repair. Because the skill requests both exec and network permissions and is described as performing monitoring and automatic repair, accidental invocation could lead to unexpected system actions or disclosure of system state.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The natural-language description, command phrases, comments, and all user-facing responses are written in Chinese, with no indication that users may choose another language. Per the policy criteria, forcing a specific language without opt-in is a locale-policy issue unless the regional constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Heartbeat data is sent over plain HTTP and includes host metadata and health telemetry such as hostname, port, memory, CPU, uptime, and connection counts. On untrusted networks this can be intercepted or modified by attackers, enabling information disclosure and potentially influencing monitoring/repair decisions with spoofed data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The exported description says the skill 'implements dual-machine heartbeat monitoring and automatic repair'. However, when a remote node is reported critical, offerHelp only assembles and logs suggestions, with an inline comment stating repair could be done via SSH or other means later. This is a direct contradiction between the documented capability and the implemented behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The user-facing command list presents '停止互修' / stop as an available command, implying the skill can stop monitoring. In reality, the branch only returns instructions to stop the process externally and even notes that the service instance would need to be maintained outside this function. This is intent/documentation that contradicts actual behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This file presents all user-facing instructions and descriptions in Chinese, including operational steps and trigger information, with no indication that users can select another language. Per the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The invocation examples and the entire user-facing README are presented only in Chinese, with command phrases such as '启动互修' and '健康检查', and there is no indication that other languages are supported or that language selection is optional. This can constitute a language/locale policy issue when users are not given an opt-in choice.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This manifest file contains a high-level description of the skill's behavior but does not define any specific invocation scope, constraints, or exclusion conditions. Phrases like '双机互修助手' and '自动修复' are broad enough that, if used for discovery or routing, they could match more situations than intended.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
90% confidence
Finding

The dependency on axios is specified with a caret range, allowing newer semver-compatible versions to be installed over time. This weakens build reproducibility and can unexpectedly introduce vulnerable or malicious upstream releases into the supply chain, especially for a network-facing monitoring/repair skill likely to make outbound requests.

Content

Scanner excerpt · package.json (reported line 23)May include surrounding context.

json
"author": "OpenClaw Skill Master",
  "license": "MIT",
  "dependencies": {
    "axios": "^1.6.0"
  },
  "devDependencies": {
    "@types/jest": "^29.5.0",

Unverifiable Dependency: axios has 16 known advisory(ies) (CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The manifest depends on axios without an exact pinned version while the analyzer notes multiple known advisories affecting some axios releases, including SSRF-related and man-in-the-middle/prototype-pollution concerns. Because this skill appears intended for heartbeat monitoring and automatic repair, it is plausibly network-capable and may process remote endpoints, making a vulnerable HTTP client materially more dangerous if an affected version is installed.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 26)May include surrounding context.

json
"axios": "^1.6.0"
  },
  "devDependencies": {
    "@types/jest": "^29.5.0",
    "@types/node": "^20.19.37",
    "jest": "^29.7.0",
    "ts-jest": "^29.1.0",

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 27)May include surrounding context.

json
},
  "devDependencies": {
    "@types/jest": "^29.5.0",
    "@types/node": "^20.19.37",
    "jest": "^29.7.0",
    "ts-jest": "^29.1.0",
    "typescript": "^5.9.3"

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 28)May include surrounding context.

json
"devDependencies": {
    "@types/jest": "^29.5.0",
    "@types/node": "^20.19.37",
    "jest": "^29.7.0",
    "ts-jest": "^29.1.0",
    "typescript": "^5.9.3"
  },

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 29)May include surrounding context.

json
"@types/jest": "^29.5.0",
    "@types/node": "^20.19.37",
    "jest": "^29.7.0",
    "ts-jest": "^29.1.0",
    "typescript": "^5.9.3"
  },
  "engines": {

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 30)May include surrounding context.

json
"@types/node": "^20.19.37",
    "jest": "^29.7.0",
    "ts-jest": "^29.1.0",
    "typescript": "^5.9.3"
  },
  "engines": {
    "node": ">=18.0.0"

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
src/index.ts:177