Back to skill

Security audit

wechat-local-reader

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rated this WeChat data reader suspicious with high confidence because scanners report privacy gaps and risky access to decrypted chat data, process memory, and application security settings.

Consider not installing unless you are comfortable with the reported risks and have reviewed the data-access and delivery behavior. In particular, weigh that chat content may be unredacted, external delivery is described despite local-only assurances, and setup may involve elevated access or changing WeChat’s signing and debugging protections. The scan was partial: 37 of 38 components were scanned, one analysis was degraded, and some references were unresolved, so the evidence is incomplete.

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

T09 · Insecure Skill Coding Practices

Error
Location
tool/wechat_cli/core/db_cache.py
Finding

Attacker-owned shared cache files can receive decrypted chat databases

Content
View full analysis

Impact

The attacker can read the decrypted database without knowing its encryption key.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
tool/wechat_cli/keys/scanner_linux.py
Finding

Privilege guidance grants process-memory access to a general Python interpreter

Content
View full analysis

Impact

Subject to kernel and security-policy restrictions, another local user can inspect unrelated users' or privileged processes and extract secrets from memory.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (66)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The generic delivery example sends CONTENT over plain HTTP without enforcing redaction at the transmission boundary. Sensitive chat-derived material can therefore reach the configured service unmasked and be exposed to network interception, despite the local-only privacy claim.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The history examples explicitly require adding --mask for redaction, contradicting the automatic-redaction assurance. In an agent workflow, unredacted tool output may already have crossed a privacy boundary before a later summarization prompt attempts to remove identifiers.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Search masking is documented as opt-in, so the automatic-redaction claim is not a safe default. Echoing a sensitive search term would additionally disclose the identifier even when matching messages are masked, although that particular search implementation is not included for verification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The automatic-redaction promise conflicts with the documented opt-in --mask flag and the supplied export implementation. Users or agents relying on that promise can expose raw conversations through stdout, exported files, or downstream services; exporting chat histories itself is an explicitly documented feature, not evidence of malicious behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented optional masking creates a real default-output privacy gap. If names or username fields contain phone numbers or email addresses, masking only message summaries would also fail to protect the promised identifier types; the specific field-level implementation is not supplied here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill repeatedly promises zero uploads while instructing an agent to send report contents through email and external webhooks. Delivery is an advertised, user-configured feature rather than covert exfiltration, but the contradictory privacy guarantee can prevent informed consent to disclosing sensitive work information.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Local key extraction is a supporting implementation detail consistent with reading encrypted WeChat databases. However, changing another application's signature and security entitlements is a materially additional capability beyond the described local reading and summarization. This action is explicitly opt-in rather than automatic by default, but that safeguard does not make it part of the declared purpose. No network transmission appears in this chunk; the external helper's implementation is not supplied, so its full behavior cannot be verified. The absence of redaction, summarization, or delivery logic in this component is not itself a mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Short message previews can still disclose complete phone numbers, bank-card numbers, or email addresses. The documented selective masking coverage does not support the universal automatic-redaction promise; the exact preview behavior remains unverified without the relevant implementation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documentation advertises favorites as a data source but limits its stated masking coverage to other commands, leaving a privacy gap under the blanket automatic-redaction claim. Unmasked favorite text or article descriptions could enter agent context or reports; the specific favorites implementation is not included, so that implementation detail remains unverified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared purpose describes reading and processing local chat data, but this command modifies the WeChat application itself and changes its security posture. Although enabling task access could support obtaining database decryption material, privileged re-signing and debug-enablement are materially broader than ordinary local database access and are not disclosed. The supplied chunk does not demonstrate database reading, redaction, summary generation, or network transmission.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Message previews can contain the same sensitive identifiers as full conversations, so excluding them from redaction undermines the skill's blanket privacy assurance. The documentation does not establish comprehensive masking for preview-producing commands, though their implementations are not supplied.

Content

No source excerpt is available for this finding.

The AI-summary and external-delivery workflow lacks a clear privacy warning and contradicts the promise of zero uploads.

High
Category
Output Handling
Confidence
98% confidence
Finding

The workflow passes extracted conversations to WorkBuddy's AI and sends summaries externally without clearly distinguishing those boundaries from local database processing. Even when direct identifiers are masked, confidential business content can remain, and the zero-upload assurance obscures that exposure.

Content

No source excerpt is available for this finding.

Privileged Linux scanning is not restricted to the requesting user's WeChat processes.

High
Category
Excessive Agency
Confidence
97% confidence
Finding

With root or CAP_SYS_PTRACE privileges, the scanner enumerates matching WeChat processes across /proc without checking their owners against the requesting user; the explicit PID path also lacks an ownership check. On a multi-user machine, this can read another user's process memory and potentially recover keys for supplied databases, violating the stated own-user-only boundary; database verification does not establish authorization.

Content

No source excerpt is available for this finding.

The promise to preserve existing entitlements is contradicted by silently proceeding with an empty entitlement set when extraction fails.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

An extraction or parsing failure returns None, which is silently replaced with an empty entitlement dictionary before re-signing. Consequently, a failure to inspect existing permissions can remove required entitlements and disrupt application operation or protected-resource access despite the promise to preserve permissions.

Content

No source excerpt is available for this finding.

The local database reader can modify the installed WeChat application's signature and debugging entitlements.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

Re-signing the installed messaging application with get-task-allow persists beyond the extraction session and can facilitate debugger access to chat contents, session material, and database keys by processes with the necessary debugger permissions. Although the operation is explicitly opt-in and supports the advertised functionality, presenting it as non-disruptive understates the loss of vendor signing identity and potential compatibility effects.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, shell.

Medium
Category
MCP Least Privilege
Confidence
80% confidence
Finding

The allowed-tools declaration is empty despite a workflow requiring shell execution, sensitive file access, and process-memory inspection. This leaves no explicit least-privilege boundary for an agent handling decrypted conversations and database keys, although actual enforcement depends on the host platform.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

  1. 让 AI 执行(把日报以 markdown 推送到该地址):

    bash
    curl -sS "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=%2A%2A%2A" \
      -H 'Content-Type: application/json' \
      -d "{\"msgtype\":\"markdown\",\"markdown\":{\"content\":$(python -c "import json,sys;print(json.dumps(open('日报.md').read()))")}}"
    

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 · tool/README_CN.md (reported line 89)May include surrounding context.

确保微信正在运行,然后:

bash
# macOS/Linux: 可能需要 sudo 权限
sudo wechat-cli init

# Windows: 在有足够权限的终端中运行

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 · tool/README_CN.md (reported line 90)May include surrounding context.

bash
# macOS/Linux: 可能需要 sudo 权限
sudo wechat-cli init

# Windows: 在有足够权限的终端中运行
wechat-cli init

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 · tool/README_CN.md (reported line 100)May include surrounding context.

md
![init-claude-code-1](image/init-claude-code-1.png)

如果是 mac,需要执行 sudo 命令,然后需要输入密码:

![init-claude-code-code-2](image/init-claude-code-2.png)

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 · tool/README_CN.md (reported line 131)May include surrounding context.

md
1. 工具会自动对微信重新签名
2. 完全退出微信(不是最小化)
3. 重新打开微信并登录
4. 再次执行 `sudo wechat-cli init`

如果自动签名失败,可以手动执行:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
98% confidence
Finding

This command does more than elevate a legitimate read: it replaces WeChat's signature and enables get-task-allow on the installed application. That weakens protection against process inspection by suitably authorized local processes, potentially exposing chat plaintext and database keys beyond the intended initialization session.

Content

Scanner excerpt · tool/README_CN.md (reported line 137)May include surrounding context.

bash
# 先退出微信,然后:
sudo codesign --force --sign - --entitlements /dev/stdin /Applications/WeChat.app <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

The manual re-signing command does not preserve WeChat's existing entitlements as promised.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The manual command supplies a replacement entitlement dictionary containing only get-task-allow; it does not preserve the existing entitlements as the documentation promises. Re-signing the installed application this way can alter its security properties and break functionality, while the blanket reassurance understates the consequences.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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 · tool/README_CN.md (reported line 139)May include surrounding context.

md
# 先退出微信,然后:
sudo codesign --force --sign - --entitlements /dev/stdin /Applications/WeChat.app <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.get-task-allow</key>

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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 · tool/README_CN.md (reported line 140)May include surrounding context.

md
sudo codesign --force --sign - --entitlements /dev/stdin /Applications/WeChat.app <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.get-task-allow</key>
    <true/>