Back to skill

Security audit

Openwechat Im Client

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed chat-client skill, but users should use a trusted HTTPS relay because it stores chat data and a relay token locally.

Install only if you are comfortable with a relay-based chat system that stores your token and message history under ../openwechat_im_client. Prefer self-hosting or a trusted relay over HTTPS, avoid sending secrets in chat, verify any non-registry ZIP download, and require clear confirmation before forwarding messages to Feishu/Telegram or publishing homepage HTML.

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

Warning
Location
scripts/sse_inbox.py:80
Finding
Authentication Token Can Be Transmitted Over Plaintext HTTP## Vulnerability Details **File Location**: `scripts/sse_inbox.py:80-94`; related insecure configuration guidance at `SERVER.md:44-48` **Vulnerability Type**: Transmission of authentication credentials over an unencrypted channel **Risk Level**: Medium ### Vulnerable Code ```python base_url = cfg["base_url"].rstrip("/") token = cfg["token"] stream_url = base_url + "/stream" try: import requests except ImportError: print("requests is required: pip install requests") sys.exit(1) headers = {"X-Token": token, "Accept": "text/event-stream"} log_channel("SSE_CONNECT_START") try: r = requests.get(stream_url, headers=headers, stream=True, timeout=60) r.raise_for_status() ``` Related documentation explicitly permits an HTTP endpoint: ```markdown 3. Access API docs at `http://YOUR_HOST:8000/docs` 4. Set `base_url` in `../openwechat_im_client/config.json` to your server, e.g.: - Local: `http://localhost:8000` - Self-hosted: `https://your-domain.com:8000` ``` ### Technical Analysis The SSE client reads an unrestricted, user-configured `base_url` and sends the authentication token in the `X-Token` request header. It neither validates the URL scheme nor limits plaintext HTTP to loopback destinations. The token functions as a bearer credential for authenticated relay operations. When a non-loopback HTTP URL is configured, the header and all relay traffic are transmitted without transport encryption. An attacker capable of observing or modifying traffic between the client and relay can recover the token. Sending the token to the configured relay is necessary for the declared IM functionality. However, allowing the credential to be sent over plaintext HTTP to arbitrary network hosts exceeds secure minimum requirements. Plaintext HTTP should only be accepted for strictly local loopback development. ### Attack Path 1. A user configures a remote relay using an HTTP URL, such as `h ...[truncated 1256 chars]
Remediation
## Remediation Suggestions 1. Parse `base_url` before constructing or sending any request. 2. Require the `https` scheme for all non-loopback destinations. 3. Permit plaintext HTTP only when the normalized hostname is exactly `localhost`, `127.0.0.1`, or `::1`. 4. Reject URLs containing unexpected credentials, malformed hostnames, or unsupported schemes. 5. Keep TLS certificate verification enabled and do not introduce `verify=False`. 6. Display a clear error explaining that authentication tokens cannot be sent to remote HTTP endpoints. 7. Update `SERVER.md`, `SKILL.md`, and the API examples so that remote deployments consistently require HTTPS. 8. Restrict `config.json` permissions to the current user and provide a documented token-rotation procedure after suspected exposure. Example validation approach: ```python from urllib.parse import urlparse parsed = urlparse(base_url) loopback_hosts = {"localhost", "127.0.0.1", "::1"} if parsed.scheme != "https": if parsed.scheme != "http" or parsed.hostname not in loopback_hosts: raise ValueError( "HTTPS is required unless the relay is hosted on a loopback address." ) ```

T08 · Insecure Dependencies

Note
Location
SKILL.md:11
Finding
Unpinned Dependency and Unverifiable Alternate Distribution Source## Vulnerability Details **File Location**: `SKILL.md:11-18`, `README.md:44-47`, and `README_zh.md:44-47` **Vulnerability Type**: Insecure software supply-chain guidance **Risk Level**: Low ### Vulnerable Content `SKILL.md` instructs installation of an unpinned Python package: ```markdown ## Runtime Dependencies (User Must Install) This skill requires the following runtime dependencies. **Install and verify them yourself** before use: - **Python 3** — for running `scripts/sse_inbox.py`, `send.py` - **Python `requests`** — `pip install requests` - **Node.js** — for `scripts/serve_ui.js` (demo UI, no npx required) The skill does not auto-install these. Ensure they are available before use. ``` `README.md` also recommends a mutable archive hosted through a file-sharing service without a checksum or signature: ```markdown **Feishu ZIP (mainland China)** ```text Please download openwechat-im-client from https://my.feishu.cn/drive/folder/RgOrfSgnYl4JC3dvZyIcdvWEn5d?from=from_copylink and help me use OpenWeChat-Claw. ``` ``` ### Technical Analysis The command `pip install requests` resolves the dependency version at installation time rather than selecting a reviewed version with an integrity hash. This weakens reproducibility and permits future dependency changes to enter the runtime without corresponding review of the Skill. Separately, the recommended Feishu ZIP is a mutable external distribution channel. The project provides no signature, immutable release identifier, or SHA-256 checksum with which users can establish that the downloaded archive matches the audited source. The dependency itself is widely used, and no evidence shows that the currently referenced package or archive is malicious. The issue is the absence of integrity and reproducibility controls, not a confirmed malicious dependency. ### Attack Path 1. An attacker compromises a package publisher account, package-distribution path, file-s ...[truncated 1315 chars]
Remediation
## Remediation Suggestions 1. Declare the Python dependency in a version-controlled requirements file instead of relying only on an ad hoc installation command. 2. Pin `requests` to a reviewed version or tightly controlled compatible range. 3. For reproducible deployments, use hashes generated by a dependency-locking tool and install with hash verification. 4. Periodically review and update pinned dependencies to avoid retaining known vulnerabilities. 5. Prefer immutable releases from the canonical repository or package registry. 6. Remove the mutable file-sharing download option unless it is operationally required. 7. If the alternate archive must remain available, publish a versioned filename and SHA-256 checksum through an independent trusted channel. 8. Sign release artifacts and document signature verification before installation. 9. Ensure the reviewed repository commit, npm artifact, and alternate ZIP contain identical files. 10. Correct the packaging inconsistency involving the referenced but absent `send.py` so users do not seek an unreviewed replacement from another source.
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (22)

Credential Access

High
Category
Privilege Escalation
Content
2. Configure and run:
   ```bash
   cp .env.example .env
   docker compose up -d --build
   ```
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Exfiltration Commands

High
Category
Prompt Injection
Content
---
name: openwechat-im-client
version: 1.0.29
description: Guide OpenClaw to use openwechat-claw with server-authoritative chat flow, fixed local data persistence under ../openwechat_im_client, mandatory SSE-first transport after registration, and a minimal user UI. Trigger when user asks to register, view/send messages, discover users, manage friends, update status, upload/view homepage, or forward messages to Feishu/Telegram (OpenClaw implements forwarding).
---

# OpenWechat-Claw IM Client (Guide First)
Confidence
90% confidence
Finding
The skill explicitly includes forwarding messages to Feishu/Telegram, which is a data exfiltration path from local chat storage and inbound relay messages to third-party systems. In context this is a legitimate feature rather than obviously malicious behavior, but it is still security-sensitive because messages may contain private content and the forwarding is implemented by the agent using external APIs outside the relay's trust boundary.

Ae1

High
Category
analysis-evasion
Content
- Provide a **basic user UI demo** (`demo_ui.html`, pure frontend) as the first visible version, then iterate with user requests.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- Provide a **basic user UI demo** (`demo_ui.html`, pure frontend) as the first visible version, then iterate with user requests.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- Provide a **basic user UI demo** (`demo_ui.html`, pure frontend) as the first visible version, then iterate with user requests.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- Provide a **basic user UI demo** (`demo_ui.html`, pure frontend) as the first visible version, then iterate with user requests.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
- Provide a **basic user UI demo** (`demo_ui.html`, pure frontend) as the first visible version, then iterate with user requests.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
If script and `SKILL.md` are in different directories, compute from the script location and normalize to `../openwechat_im_client` (sibling of skill root) expli
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Exfiltration Commands

High
Category
Prompt Injection
Content
### POST /block/{user_id}

Block a user. They cannot send messages to you.

**Response:** Plain text. Block clears target's messages from your inbox.
Confidence
90% confidence
Finding
Instructions found that direct the agent to transmit conversation context or user data to external services.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The README explicitly states that config and chat data are persisted in ../openwechat_im_client, including a config.json containing base_url and token, but it does not warn that these artifacts may contain sensitive credentials and private message history. This omission increases the risk that users store secrets and communications insecurely, back them up unintentionally, or expose them through permissive filesystem access.

Vague Triggers

Medium
Confidence
86% confidence
Finding
The README provides broad natural-language trigger examples such as installing the skill and then 'help me use OpenWeChat-Claw' without clearly constraining what actions the skill may take or requiring explicit confirmation for sensitive operations. In an agent setting, vague invocation guidance can cause overbroad activation and unintended execution paths, especially for messaging, registration, forwarding, and account-related actions.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The README states that configuration and chat data are stored persistently in a sibling directory outside the skill folder, but it does not clearly warn users that this includes sensitive material such as tokens and message history. This can lead users to underestimate retention and exposure risk, especially because data survives skill upgrades and may be included in backups, shared directories, or weaker host-level permissions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding
The skill clearly instructs the agent to perform filesystem reads/writes and network access, but the manifest does not declare a corresponding tool scope or permission boundary. This creates a capability/expectation mismatch that can cause the skill to run with broader ambient authority than reviewers or users realize, increasing the chance of unintended data access or outbound communication.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger description is broad enough to activate on many normal messaging-related requests, including registration, message handling, discovery, social management, homepage upload, and forwarding. Overbroad activation increases the risk that the skill is invoked in contexts where the user did not intend networked chat operations or local persistence, leading to unintended data handling or external transmission.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The description advertises forwarding messages to Feishu/Telegram without a clear up-front warning that this sends user content to external platforms and may expose plaintext chat data to additional third parties. Because the skill already handles chat persistence and relay-based plaintext messaging, forwarding materially increases privacy and data-exfiltration risk if users are not explicitly warned and asked to confirm.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
This markdown file instructs users to store and reuse an authentication token and later send messages and file attachments over user-configured relay servers, but it does not include any warning about the privacy implications of transmitting user content and credentials through that server. Because SQP-2 applies to markdown files when descriptions omit warnings about behaviors affecting user data or privacy, this omission is a valid finding.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The API supports uploading arbitrary HTML to a publicly accessible homepage endpoint, but the documentation does not clearly warn users that the content is world-readable and may execute active client-side code in viewers' browsers. In a skill context, this increases the chance that operators unintentionally publish sensitive data or unsafe HTML/JavaScript.

External Transmission

Medium
Category
Data Exfiltration
Content
---

## curl Examples

```bash
# BASE: set from ../openwechat_im_client/config.json (user's relay server)
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The UI is explicitly designed to fetch and render local persistence files such as profile.json, contacts.json, inbox_pushed.md, conversations.md, and sse_channel.log from /openwechat_im_client. In the context of a messaging client, these files likely contain private profile metadata, contact relationships, message content, and connection state; exposing them in a browser UI without any access control, minimization, or user-facing disclosure increases the chance of unintended sensitive-data exposure to anyone with access to the page or its origin.

Natural-Language Policy Violations

Low
Confidence
80% confidence
Finding
该文件整体以中文强制呈现操作说明,仅在 L05 提供英文 README 链接,但未说明技能是否会根据用户偏好选择语言,或该文档仅适用于中文用户。根据语言/locale 政策,若内容默认强制特定语言而没有明确选择机制或适用范围说明,可能构成自然语言层面的政策问题。

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The code initializes the language to 'zh' by default when no prior preference exists, which imposes a specific locale before the user chooses one. Although a language switcher is present, the initial forced default can violate a language/locale choice policy when no opt-in has occurred.

Static analysis

No suspicious patterns detected.