Back to skill

Security audit

Openwechat Homepage Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent guide for creating and publishing an OpenClaw identity homepage, with public-sharing and token-use risks users should understand before using it.

Before installing, understand that generated identity cards may become public to anyone with the URL, especially on static hosting or the documented unauthenticated homepage endpoint. Avoid publishing secrets, private contact details, or sensitive personal data; verify the relay base_url before upload; do not expose the token; and sanitize or carefully review generated HTML and links before publishing.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:28
Finding
Unsanitized user-controlled values in generated public HTML<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:28-33, 43-46` **Vulnerability Type**: Stored HTML/script injection through unsafe template substitution **Risk Level**: Medium ### Vulnerable Code ```markdown 1. **Collect info**: name, description, avatar URL (optional), links (e.g. GitHub, blog). 2. **Generate HTML**: Use `index.html.example` as template; keep under 512KB for server upload. 3. **Register** to chosen target (see below). ``` ```html <img class="avatar" src="{{avatar_url}}" alt="avatar"> <h1>{{name}}</h1> <p class="desc">{{description}}</p> <p><a href="{{link}}">{{link_text}}</a></p> ``` ### Technical Analysis The Skill directs the Agent to collect user-controlled identity fields and substitute them into an HTML template, but it does not require context-sensitive escaping or URL validation. The `name`, `description`, and `link_text` values are inserted into HTML text contexts. An attacker can supply closing tags and additional markup, potentially including executable script content. The `avatar_url` and `link` values are inserted into quoted attribute contexts without escaping. An attacker may therefore attempt to terminate an attribute and introduce new attributes or elements. The `link` field may also contain an unsafe URI scheme such as `javascript:` unless the generated output validates schemes. Because the workflow subsequently publishes the generated document to the OpenWechat relay or a public static-hosting provider, successful injection becomes stored in a publicly accessible page rather than remaining limited to the generation session. ### Attack Path 1. An attacker provides a crafted value for an identity-card field such as the name, description, avatar URL, link text, or link destination. 2. The Agent follows the documented workflow and substitutes that value directly into the HTML template. 3. No required escaping, sanitization, or URL-scheme allowlist prevents the supplied value from altering the resulting do ...[truncated 1092 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Apply context-aware HTML escaping to every user-controlled value before template substitution: - Escape `&`, `<`, and `>` in text nodes. - Additionally escape quotation marks in attribute values. - Use a maintained templating system with automatic escaping rather than manual string replacement. 2. Parse and validate `avatar_url` and `link` before placing them into the document: - Allow only explicitly supported schemes, preferably `https:`. - Optionally allow `http:` only when necessary. - Reject `javascript:`, `data:`, `vbscript:`, malformed URLs, control characters, and scheme-obfuscation attempts. - Consider restricting avatar sources to trusted HTTPS hosts or proxying images through a controlled service. 3. Do not permit arbitrary HTML in the name, description, or link-text fields. If formatted descriptions are required, process them with a well-maintained HTML sanitizer using a minimal allowlist of elements and attributes. 4. Add validation limits for each field, including maximum lengths and expected character formats. 5. Inspect or sanitize the complete generated document before publication. Consider enforcing a restrictive Content Security Policy, for example by disallowing inline scripts and limiting image, navigation, and connection destinations. 6. Add security tests covering closing-tag injection, quote termination, event-handler attributes, unsafe URI schemes, encoded payloads, and mixed-case or whitespace-obfuscated schemes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The README advertises upload to the openwechat-claw server and deployment to public hosting platforms, but it does not clearly warn users that profile data, links, avatars, and identifiers may become visible to friends or fully public on the internet. This omission is dangerous because users may unknowingly expose personal information through generated homepage content or registration workflows.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The trigger phrases include generic requests such as '创建主页' and 'identity card', which can plausibly overlap with ordinary content-creation tasks and cause the skill to activate in situations the user did not specifically intend. In a skill that can upload content to a server or publish it publicly, overly broad activation increases the chance of unintended deployment-related guidance or actions being suggested without sufficient user awareness.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The document states that uploaded homepages become visible to other IM users but does not clearly warn users that this is public publication of potentially identifying content. In a skill specifically meant to create and register an identity card/homepage, omission of an explicit privacy warning can lead users to unintentionally expose personal data, links, contact info, or tracking content.

External Transmission

Medium
Category
Data Exfiltration
Content
---

## curl Examples

```bash
# From config
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
98% confidence
Finding
The file explicitly documents that anyone can access `GET /homepage/{user_id}` with no token required, but it does not present this as a security/privacy warning. Because the skill encourages publication of user-created identity pages, users may wrongly assume access is limited to authenticated peers when the content is actually world-readable to anyone with the URL.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to read a user's `base_url` and `token` from config and upload homepage content to a remote server, but it provides no explicit warning about token sensitivity, destination trust, or the fact that homepage content may become publicly accessible. This creates a real privacy/security risk because an agent following the skill could handle secrets or publish user data without informed consent, especially if the server endpoint is untrusted or misconfigured.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The document explicitly guides users to publish an identity card/homepage to public free hosting, but it does not warn that the content will be publicly accessible and indexable. In the context of an identity card skill, users may include personally identifying information, profile links, contact details, or other sensitive metadata, creating privacy and doxxing risk through oversharing rather than a software exploit.

Static analysis

No suspicious patterns detected.