Back to skill

Security audit

weixin-mcp

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it gives a mutable third-party CLI access to WeChat login tokens and private messages, so users should review it carefully before installing.

Install only if you trust the weixin-mcp npm package and are comfortable giving it access to your WeChat session, contacts, messages, attachments, and local credential storage. Prefer an exact reviewed package version, keep WEIXIN_MCP_DIR in a dedicated protected directory, use localhost or trusted internal webhooks only, and confirm before sending or reading messages when the skill activates from a broad WeChat-related request.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Note
Location
SKILL.md:10
Finding

Mutable npm Dependency Is Downloaded and Executed Through npx

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:10
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Suspicious

Vulnerable Code

text
No installation needed — uses `npx weixin-mcp@^1.7` directly (version pinned for security).

Technical Analysis

The Skill directs the Agent to download and immediately execute the external weixin-mcp npm package through npx. The version constraint ^1.7 is not an immutable security pin: it can resolve to later compatible releases in the 1.x series. Consequently, the code executed at runtime can differ from the code that existed when this Skill was reviewed.

The external package source is not included in the audited project, so its runtime implementation could not be verified. The documented commands grant that package access to sensitive operations and data, including WeChat login credentials, contacts, message content, local attachments, webhook payloads, and a long-running daemon. Network communication is necessary for the declared WeChat integration, but dynamically executing an unreviewed package version exceeds the minimum supply-chain assurance required for handling such sensitive data.

No evidence was found that the Skill intentionally selects a malicious package, uses a typosquatted name, or sends information to a concealed attacker-controlled endpoint. The risk arises from mutable third-party code and immediate execution rather than confirmed malicious behavior.

Attack Path

  1. An attacker compromises the npm publisher account, package repository, build pipeline, or another component used to publish weixin-mcp.
  2. The attacker publishes a malicious package release that satisfies the ^1.7 version range.
  3. A user or Agent follows the Skill instructions and invokes a command such as npx weixin-mcp@^1.7 login, send, poll, or start.
  4. npx resolves, downloads, and executes the compromised release without requiring that it ma ...[truncated 1226 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace weixin-mcp@^1.7 with an exact, reviewed release such as weixin-mcp@1.7.x, using the specific patch version approved by the maintainer.
  2. Use a lockfile and verify the package integrity hash so installation fails if the resolved artifact changes unexpectedly.
  3. Prefer a controlled installation process over repeated runtime downloads through npx. Vendor the reviewed source or install it from a trusted internal registry where feasible.
  4. Audit the resolved package and all transitive dependencies before deployment, and repeat the review before upgrading.
  5. Run the CLI under a dedicated, unprivileged account with filesystem access limited to the required WeChat data and explicitly selected attachments.
  6. Restrict outbound network access to endpoints required for WeChat operation. Keep webhook destinations on localhost or a trusted internal network unless the user explicitly approves an external recipient.
  7. Protect credential files with restrictive permissions and ensure daemon logs do not expose login tokens, context tokens, or private message content.
  8. Update the documentation to avoid describing a caret range as “pinned for security” and clearly disclose that npx may retrieve and execute external code.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (23)

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The setup flow instructs the agent to tell the user a fixed Chinese message ('请扫码登录微信 bot:...') during login. This imposes a specific language on the interaction without user opt-in, and the document does not state that the skill is intended only for Chinese-speaking users or provide an alternative language path.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list contains broad single-word terms such as "weixin" and "wechat" that are likely to appear in normal user requests, which can cause the skill to activate when the user did not explicitly intend to invoke it. Because this skill can send and receive WeChat messages, unintended activation could lead to accidental message handling or disclosure of message-related data within the agent workflow.

Content

No source excerpt is available for this finding.