Back to skill

Security audit

Wechat File Helper

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent WeChat automation purpose, but its scripts can send messages and transmit full browser screenshots containing login QR material without tight targeting, recipient validation, or per-action confirmation.

Review this skill carefully before installing. Only use it with a dedicated WeChat File Helper account and a private, verified QR delivery recipient. Avoid enabling the cron wrapper until the scripts are changed to target a specific WeChat tab, capture only the QR element, delete temporary QR files, validate recipients, and require confirmation before sending messages or screenshots.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/monitor.sh:10
Finding

Untargeted browser screenshot may disclose unrelated sensitive content

Content
View full analysis
&1) if echo "$PAGE_STATE" | grep -q "_/\|chat\|message"; then echo "Logged in! Sending test message..." else echo "Not logged in - capturing QR..." # Capture QR browser action=screenshot path="$OUTPUT_FILE" # Send QR to user if [ -f "$OUTPUT_FILE" ]; then message action=send to="$USER_PHONE" media="$OUTPUT_FILE" echo "QR code sent to $USER_PHONE" else echo "Failed to capture QR" fi fi ``` `scripts/capture_qrcode.sh:7-14`: ```bash echo "Capturing QR code from filehelper.weixin.qq.com..." # Take screenshot browser action=screenshot path="$OUTPUT_FILE" if [ -f "$OUTPUT_FILE" ]; then echo "QR code captured: $OUTPUT_FILE" ls -la "$OUTPUT_FILE" ``` ### Technical Analysis The code queries tabs using the expected WeChat URL but does not extract, validate, or retain the `targetId` of the matching tab. The subsequent `browser action=screenshot` command is invoked without a `targetId` or an element selector. Consequently, the screenshot can be taken from the active or default browser context rather than the WeChat File Helper tab. In `monitor.sh`, the resulting image is then sent through a configured messaging channel. The script also does not verify the final page origin or confirm that the captured image contains a WeChat QR element before transmission. This behavior exceeds the minimum browser access necessary for the declared functionality. The Skill only needs to capture the QR element on a validated WeChat page, not the entire active browser context. ### Attack Path 1. The user or a scheduled job invokes `scripts/monitor.sh`. 2. A browser page other than ...[truncated 1073 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/monitor.sh:10
Finding

Untargeted browser actions can type and submit content on the wrong page

Content
View full analysis
&1) if echo "$PAGE_STATE" | grep -q "_/\|chat\|message"; then echo "Logged in! Sending test message..." # Type message browser action=act request='{"kind":"type","ref":"input","text":"Hello from OpenClaw! 🦞"}' # Click send browser action=act request='{"kind":"click","ref":"send"}' echo "Message sent!" ``` ### Technical Analysis The script determines login state by applying a broad regular-expression match to the textual output of a tab query. Matches for `_`, `chat`, or `message` are not sufficient to prove that a specific WeChat File Helper page is authenticated. After this heuristic check, the script invokes browser actions without a `targetId`. The references `input` and `send` are generic and are not tied to a fresh snapshot from a validated WeChat tab. If another page is selected as the automation target and exposes compatible references, the fixed message may be typed and a button may be clicked there. The code also reports success without checking the resulting URL, page state, or a reliable send confirmation. ### Attack Path 1. A browser session contains a tab-query result matching `_`, `chat`, or `message`. 2. The heuristic classifies the session as logged in. 3. A different page is the active or default browser automation target. 4. That page has usable `input` and `send` references. 5. The script types `Hello from OpenClaw! 🦞` and activates the send control. 6. The unrelated page submits content or performs another action associated with that control. ### Impact Assessment The code uses the caller's existing authenticated browser privileges. It does not escalate system privileges, but it can cause unintended actions in authenticate ...[truncated 404 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/capture_qrcode.sh:4
Finding

Sensitive login QR image is stored at a predictable and unmanaged temporary path

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cron-wechat.sh:1
Finding

Cron-ready wrapper repeatedly executes outbound actions with inconsistent recipient handling

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs the agent to capture a WeChat login QR code and send it through external channels such as WhatsApp, Telegram, or Slack without a prominent privacy and security warning. Login QR images are authentication artifacts; forwarding them to third-party messaging systems can expose account access to unintended recipients, channel compromise, retention policies, or logging by external services.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
| Wrong refs after reload | Page reload resets refs |
| QR not sending | Check configured channels |
| Messages not arriving | Verify recipient is correct |
| Cron not working | Check `crontab -e` entry |
| Browser not starting | Run `openclaw browser status` |

---

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script detects a logged-in state and then automatically types and sends a message through the browser without any runtime confirmation from the user. This grants the skill active impersonation capability in a messaging context, which could be abused to send unauthorized content, spam, or social-engineering messages from the user's account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The screenshot is captured and transmitted externally with no clear disclosure of what data is being collected or sent, and screenshots can contain highly sensitive content beyond the intended QR code. In this context, the page relates to account login, so undisclosed capture and transfer increases the risk of credential exposure and privacy violations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script captures a browser screenshot containing a WeChat login QR code and sends it to an arbitrary phone number supplied as input, creating an exfiltration channel for sensitive authentication material. Because there is no validation, consent check, or documented business need for outbound transmission, this can leak account access data or other page contents to an external recipient.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code file performs shell execution by sourcing monitor.sh, but the file itself provides no user-facing disclosure beyond an internal comment. Under the stated criteria for code files, subprocess or shell execution should have some visible warning, logging, confirmation, or documented warning in accompanying markdown.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.