Back to skill

Security audit

Wechat Connect

Security checks for vulnerabilities and agentic risk

Overview

This WeChat pairing skill is purpose-aligned, but it has serious credential exposure, command execution, and supply-chain risks that require review before installation.

Review this skill before installing. It performs real local administration: downloads and executes an npm installer, writes WeChat bot credentials, changes OpenClaw configuration, and restarts the gateway. It should be revised to pin the installer version, require explicit approval, keep tokens out of browser-visible status data and `/tmp`, bind any local server to loopback with narrow routes, validate remote identifiers, and avoid shell-string command construction.

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 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 (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/start.mjs:299
Finding

WeChat Bot Token Exposed Through an Unauthenticated Network Endpoint

Content
View full analysis
{ server.listen(HTTP_PORT, () => { log(`HTTP service started: http://localhost:${HTTP_PORT}`); resolve(server); }); }); ``` ```js case 'confirmed': updated.message = 'Login successful!'; updated.connected = true; updated.botToken = data.bot_token; updated.ilinkBotId = data.ilink_bot_id; updated.ilinkUserId = data.ilink_user_id; updated.baseUrl = data.baseurl; log('Login successful!'); break; ``` ### Technical Analysis After pairing is confirmed, the complete bot token, bot identifier, user identifier, and service base URL are added to the status object. `writeStatus()` serializes that entire object into the status file. The `/status` endpoint subsequently returns the entire status object without authentication, field filtering, session validation, or authorization. The wildcard `Access-Control-Allow-Origin: *` header also permits scripts from arbitrary web origins to read the response when the endpoint is reachable. Calling `server.listen(HTTP_PORT)` without specifying a host normally binds the service to unspecified IPv6 or IPv4 interfaces, rather than guaranteeing a loopback-only listener. The log message describing the service as `localhost` does not enforce that restriction. The browser only needs pairing progress such as `wait`, `scaned`, `confirmed`, or `expi ...[truncated 1386 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/start.mjs:27
Finding

Predictable Sensitive Temporary Files and Overbroad Temporary-Directory File Serving

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/start.mjs:448
Finding

Shell Command Injection Through an Unvalidated Remote User Identifier

Content
View full analysis
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/start.mjs:480
Finding

Automatic Retrieval and Execution of an Unpinned npm Package

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata claims no command-line interaction is required, but the implementation executes multiple shell commands for config inspection, package installation, configuration changes, and service restart. This mismatch is security-relevant because it conceals privileged local side effects from users and reviewers, reducing informed consent and increasing the chance of unexpected system modification.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill performs network operations, opens a local HTTP service, writes local account/config files, and triggers installation/configuration actions, but it declares no explicit tool scope or permissions. This weakens user consent and platform enforcement because the skill can exercise meaningful capabilities without a transparent capability declaration.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The user-facing instructions and trigger phrases are presented only in Chinese, and the document does not offer an alternative language or state that the skill is intentionally limited to a Chinese-speaking region or audience. Under the policy, locale-specific behavior should either be optional for the user or explicitly justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger includes a broad natural-language example like '装一下微信', which increases the chance of accidental invocation from loosely related user phrasing. In this skill, unintended triggering is more dangerous because invocation can lead to package installation, network access, config changes, and background restart.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

Using npx -y ...@latest install pulls and executes the newest package version at runtime without pinning, creating a supply-chain execution path. If the package, maintainer account, or dependency chain is compromised, arbitrary code could run during installation with the user's privileges.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill documentation describes automatic writes to ~/.openclaw/..., configuration mutations, allowlist changes, and a background gateway restart, but it does not present these as a prominent user-facing warning before execution. This undermines informed consent and could cause unexpected persistence, service disruption, or trust boundary changes on the host.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file-level documentation describes a CLI-driven workflow while the skill metadata advertises a simpler no-command-line flow. Such deceptive or inconsistent presentation is dangerous in a security review context because it obscures that the skill performs local administration actions beyond displaying a QR code.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script writes the WeChat bot token and related account details to disk in the user's home directory without prompting, warning, or setting restrictive permissions explicitly. If the account store is exposed through weak filesystem permissions, backups, shared environments, or later local compromise, the token could be reused to impersonate the account or access bot functionality.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill does more than QR pairing: it installs software, changes OpenClaw configuration, and restarts the gateway via shell-capable process execution. In this context, that broader capability increases the blast radius of any bug or compromise because the skill can alter the local environment and execute external programs.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The script installs @tencent-weixin/openclaw-weixin-cli@latest via npx, which fetches and executes whatever code is current at runtime. This creates a supply-chain execution risk: a compromised publisher account, malicious release, or breaking upstream update would run arbitrary code on the user's machine during install.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

This location repeats the same unsafe install pattern using unpinned npx ...@latest, causing runtime execution of remote code without version control. Because it occurs in the actual install path, exploitation would directly yield arbitrary code execution under the invoking user's privileges.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

Even though this instance is in a user-facing error/help message rather than executed code, it instructs the operator to run the same unpinned npx ...@latest command manually. That still propagates the same supply-chain risk outside the script.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/start.mjs:59