Back to skill

Security audit

Weixin Chat

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because scanners report private chat data being persistently exported and a path-handling flaw that could copy unrelated local files into the media export; the evidence does not establish malicious intent.

Review carefully before installing. Consider whether you are comfortable with local chat transcripts, attachments, and keys being saved to disk, and with the reported possibility that a crafted attachment title could cause an unrelated local file to be copied into an export. The scan is partial because a referenced local path was missing, so it does not provide complete evidence.

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
wxmedia.py
Finding

Untrusted attachment titles can escape the media source directory

Content
View full analysis

Impact

A traversal title can select an existing file outside the attachment directory and copy its contents into the conversation's media export. This stages unrelated private files in an output authorized only for chat attachments. The demonstrated operation is local copying, not network exfiltration or code execution.

Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The core local chat-reading and monitoring purpose is consistent with the description, and key capture and database decryption are supporting implementation details. However, the supplied program's interaction contract materially differs from the advertised agent-ready CLI: it uses repeated input() prompts and formatted terminal output, with no JSON command interface shown. No network operations are visible in this chunk, though the behavior of imported modules cannot be verified from the supplied code.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
---
name: weixin-chat
description: Read and monitor the user's own local weixin (薇芯) chat history on Windows. Use this when the user asks an AI to access their own weixin conversations — e.g. read the FULL chat history of a specified conversation, or WATCH a specified conversation for new incoming messages in real time. All processing is local (no network); it decrypts the user's own local database on their own machine. Commands are a plain Python CLI (`wxskill.py`) that outputs JSON, so any agent can use it.
license: for personal, local, educational use on the user's own account only
---

# weixin-chat — �

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

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The read/monitor skill persistently exports chat transcripts and attachments to disk.

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

The manifest describes reading and monitoring conversations through a JSON-output CLI, but L106–L111 create or append persistent plaintext transcript files. In addition, L104 invokes attachment export through _media_suffix (L55–L58), creating additional local copies of shared files and videos; these durable exports go beyond returning requested conversation data and introduce an undeclared retention behavior.

Content

No source excerpt is available for this finding.

The key-capture workflow extends beyond chat history to unrelated Weixin databases.

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The workflow enumerates all encrypted databases and encourages opening Favorites, Moments, and public-account content before invoking account-wide key capture. This exceeds the selected-chat export requirement and can persist credentials for unrelated private data, increasing exposure if the saved key file is accessed; the confirmation is for general key capture rather than granular database scope.

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · wxskill.py (reported line 46)May include surrounding context.

python
"keys_ready": {}}
    for mod in ("Crypto", "zstandard", "psutil", "frida"):
        try:
            __import__(mod)
            info["deps"][mod] = True
        except Exception:
            info["deps"][mod] = False

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The unconstrained pycryptodome requirement allows installations to resolve to different, unreviewed releases. This is a dependency-integrity weakness rather than proof of an existing exploit, but the package runs in a workflow handling decrypted private communications.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
# 运行依赖。精确的已验证版本见 README「已验证环境」。
# 抓密钥(setup)需要 frida;解密/读取/导出需要 pycryptodome、zstandard、psutil。
pycryptodome
psutil
frida
zstandard

Unverifiable Dependency: pycryptodome has 4 known advisory(ies) (CVE-2018-15560 (PyCryptodome integer overflow vulnerability); CVE-2023-52323 (PyCryptodome and pycryptodomex side-channel leakage for OAEP decryption); CVE-2018-15560 (PyCryptodome before 3.6.6 has an integer overflow in the data_len variable in AE) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

OSV returned advisories for this package, but its resolved version is unknown. A package-name lookup does not establish whether the installed release is affected by those advisories.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The psutil dependency has no version constraint or artifact hash, making installations non-reproducible and permitting unreviewed release changes. Its use in a privacy-sensitive local process-inspection workflow increases the consequences of a compromised dependency, although no compromise is demonstrated.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
# 运行依赖。精确的已验证版本见 README「已验证环境」。
# 抓密钥(setup)需要 frida;解密/读取/导出需要 pycryptodome、zstandard、psutil。
pycryptodome
psutil
frida
zstandard

Unverifiable Dependency: psutil has 2 known advisory(ies) (CVE-2019-18874 (Double Free in psutil); CVE-2019-18874 (psutil (aka python-psutil) through 5.6.5 can have a double free. This occurs bec)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

OSV returned advisories for this package, but its resolved version is unknown. A package-name lookup does not establish whether the installed release is affected by those advisories.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The unpinned frida dependency allows future installations to execute an unreviewed package version. Because this dependency supports process instrumentation and key capture, dependency integrity is especially important, though this manifest alone does not demonstrate malicious code.

Content

Scanner excerpt · requirements.txt (reported line 5)May include surrounding context.

text
# 抓密钥(setup)需要 frida;解密/读取/导出需要 pycryptodome、zstandard、psutil。
pycryptodome
psutil
frida
zstandard

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The zstandard requirement does not constrain the installed version or verify artifact identity, allowing dependency drift across installations. This weakens reproducibility and supply-chain assurance, but does not establish that any particular release is unsafe.

Content

Scanner excerpt · requirements.txt (reported line 6)May include surrounding context.

text
pycryptodome
psutil
frida
zstandard