Back to skill

Security audit

微信生态数据采集

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its WeChat lookup purpose, but it deserves review because it sends authenticated queries to a third party and includes broad auto-invocation plus video download/decryption guidance.

Install only if you are comfortable sending WeChat search terms, article links, share URLs, and a MaxHub API key to www.aconfig.cn. Use a dedicated, revocable API key, invoke it only with explicit WeChat-related requests, be cautious with any video download/decryption output, and prefer a pinned/trusted installer path instead of the unpinned npx command.

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

T08 · Insecure Dependencies

Warning
Location
README.md:14
Finding

Unpinned npm Package Execution in English Installation Instructions

Content
View full analysis

Vulnerability Details

File Location: README.md, lines 14–18
Vulnerability Type: Unpinned third-party package execution
Risk Level: Medium

Vulnerable Code

markdown
## Install

```bash
npx clawhub install maxhub-wechat
text

### Technical Analysis

The installation instructions invoke `clawhub` through `npx` without specifying a reviewed version or integrity constraint. If the package is not already available locally, `npx` may retrieve the currently resolved package from the npm registry and execute it immediately.

Because dependency resolution is mutable, the code executed when a user follows this instruction may differ from the package version available when the Skill was audited. Compromise of the npm package, its publisher account, or the relevant registry resolution path could therefore introduce arbitrary installation-time behavior.

The command does not by itself demonstrate malicious intent, but it creates an avoidable supply-chain trust boundary and permits remote package code outside this repository to execute with the invoking user's privileges.

### Attack Path

1. An attacker compromises the npm package, its publisher account, or another component capable of affecting package resolution.
2. The attacker publishes a malicious version under the package name resolved by `npx`.
3. A user follows the documented installation command.
4. `npx` downloads the mutable package version and executes its package code.
5. The malicious code runs under the user's account before or during installation.

### Impact Assessment

Successful exploitation could provide arbitrary code execution with the privileges of the user running the installation command. Depending on that user's permissions and environment, the malicious package could:

- Read files accessible to the user.
- Access environment variables and locally stored credentials.
- Modify user-owned configuration or executable files.
- Install additional packages or persistence mecha
...[truncated 215 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin clawhub to an explicitly reviewed version, for example:
bash
npx clawhub@1.2.3 install maxhub-wechat
  1. Review the pinned package version and its transitive dependencies before recommending it.
  2. Where supported, verify package provenance, signatures, or published integrity metadata.
  3. Prefer a lockfile-backed or otherwise reproducible installation workflow.
  4. Document the expected publisher and registry so users can detect package substitution.
  5. Avoid recommending npx with an unqualified package name for security-sensitive installations.

T08 · Insecure Dependencies

Warning
Location
README_CN.md:14
Finding

Unpinned npm Package Execution in Chinese Installation Instructions

Content
View full analysis

Vulnerability Details

File Location: README_CN.md, lines 14–18
Vulnerability Type: Unpinned third-party package execution
Risk Level: Medium

Vulnerable Code

markdown
## Installation

```bash
npx clawhub install maxhub-wechat
text

### Technical Analysis

The localized installation instructions execute `clawhub` through `npx` without pinning the package to a reviewed version or integrity digest. When the package is unavailable locally, `npx` may download and immediately execute the version currently resolved by the npm registry.

Consequently, the effective installer is not fixed to the content reviewed during this audit. A malicious package release, compromised publisher account, or manipulated dependency-resolution path could cause users to execute attacker-controlled code.

This is a supply-chain weakness rather than evidence that the repository itself contains malicious executable code.

### Attack Path

1. An attacker gains the ability to publish or substitute the npm package resolved as `clawhub`.
2. The attacker supplies a version containing malicious installation or runtime behavior.
3. A user copies and runs the command from `README_CN.md`.
4. `npx` retrieves the attacker-controlled package version.
5. The package executes with the permissions and environment of the user who launched the command.

### Impact Assessment

Exploitation could result in arbitrary code execution under the invoking user's account. The package could access user-readable files, environment variables, API credentials, and local configuration; modify user-owned resources; or download and execute additional payloads.

The maximum direct privilege is that of the invoking user unless another independent privilege-escalation weakness is present.
Remediation
View remediation

Remediation Suggestions

  1. Replace the unqualified package invocation with a reviewed, pinned version:
bash
npx clawhub@1.2.3 install maxhub-wechat
  1. Keep the pinned version synchronized across all localized documentation.
  2. Audit the pinned release and its dependency tree.
  3. Use package provenance or integrity verification where available.
  4. Prefer reproducible, lockfile-backed installation methods.
  5. Clearly document the trusted package publisher and registry.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (37)

Hidden Instructions

High
Category
Prompt Injection
Confidence
79% confidence
Finding

Using hidden comments as an authoritative source for API paths creates an opaque control surface that can steer requests in ways not evident from the visible skill description. In the context of authenticated external calls, that opacity increases the risk of covert scope expansion or accidental use of undocumented endpoints.

Content

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

md
| 禁止行为 | 正确做法 |
|----------|----------|
| ❌ 自行拼接路径(如 `/api/v1/douyin/search/xxx`) | ✅ 使用 Action Table 或 `<!-- Full path: -->` 中的路径 |
| ❌ 猜测参数名(如把 `aweme_id` 写成 `video_id`) | ✅ 使用 Action Table 或 reference 文件中的参数名 |
| ❌ 假设 v1/v2/v3 参数兼容 | ✅ 降级时重新读取对应版本的参数文档 |
| ❌ 调用 `fetch_hot_search_list` 或 `app/v3/fetch_video_comments` | ✅ 使用替代端点(见废弃标注) |

Hidden Instructions

High
Category
Prompt Injection
Confidence
79% confidence
Finding

Using hidden comments as an authoritative source for API paths creates an opaque control surface that can steer requests in ways not evident from the visible skill description. In the context of authenticated external calls, that opacity increases the risk of covert scope expansion or accidental use of undocumented endpoints.

Content

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

md
| 禁止行为 | 正确做法 |
|----------|----------|
| ❌ 自行拼接路径(如 `/api/v1/douyin/search/xxx`) | ✅ 使用 Action Table 或 `<!-- Full path: -->` 中的路径 |
| ❌ 猜测参数名(如把 `aweme_id` 写成 `video_id`) | ✅ 使用 Action Table 或 reference 文件中的参数名 |
| ❌ 假设 v1/v2/v3 参数兼容 | ✅ 降级时重新读取对应版本的参数文档 |
| ❌ 调用 `fetch_hot_search_list` 或 `app/v3/fetch_video_comments` | ✅ 使用替代端点(见废弃标注) |

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

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

md
| "analyze" / "分析一下" | Switch to analyze mode |
| "compare with X" / "和X对比" | Add X as second query |

## Output Guidelines

1. **Language consistency** — ALL output matches user's detected language.
2. **Markdown links** — All URLs in `[text](url)` format.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-channels.md (reported line 13)May include surrounding context.

md
> ⚠️ **参数校验提示**:`video_id` 为必填参数,格式为纯数字字符串。`cursor` 使用上一页返回的值,不要自行构造。

<!-- Full path: /api/v1/wechat_channels/fetch_comments -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-channels.md (reported line 84)May include surrounding context.

md
`POST /api/v1/wechat_channels/fetch_home_page`

<!-- Full path: /api/v1/wechat_channels/fetch_home_page -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-channels.md (reported line 154)May include surrounding context.

md
`GET /api/v1/wechat_channels/fetch_live_history`

<!-- Full path: /api/v1/wechat_channels/fetch_live_history -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-channels.md (reported line 223)May include surrounding context.

md
`GET /api/v1/wechat_mp/web/fetch_mp_article_comment_reply_list`

<!-- Full path: /api/v1/wechat_mp/web/fetch_mp_article_comment_reply_list -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-channels.md (reported line 282)May include surrounding context.

md
> ⚠️ **参数校验提示**:`url` 为必填参数,须为完整的微信公众号文章链接(含 `__biz`、`mid`、`idx`、`sn` 参数)。

<!-- Full path: /api/v1/wechat_mp/web/fetch_mp_article_detail_json -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-channels.md (reported line 342)May include surrounding context.

md
`GET /api/v1/wechat_channels/fetch_search_channels`

<!-- Full path: /api/v1/wechat_channels/fetch_search_channels -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-channels.md (reported line 415)May include surrounding context.

md
`GET /api/v1/wechat_mp/web/fetch_search_official_account`

<!-- Full path: /api/v1/wechat_mp/web/fetch_search_official_account -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-channels.md (reported line 488)May include surrounding context.

md
`GET /api/v1/wechat_channels/fetch_user_search`

<!-- Full path: /api/v1/wechat_channels/fetch_user_search -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-channels.md (reported line 544)May include surrounding context.

md
`GET /api/v1/wechat_channels/fetch_video_by_share_url`

<!-- Full path: /api/v1/wechat_channels/fetch_video_by_share_url -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-mp.md (reported line 11)May include surrounding context.

md
`GET /api/v1/wechat_mp/web/fetch_mp_article_ad`

<!-- Full path: /api/v1/wechat_mp/web/fetch_mp_article_ad -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-mp.md (reported line 63)May include surrounding context.

md
`GET /api/v1/wechat_mp/web/fetch_mp_article_read_count`

<!-- Full path: /api/v1/wechat_mp/web/fetch_mp_article_read_count -->

### Parameters

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/api-mp.md (reported line 115)May include surrounding context.

md
`GET /api/v1/wechat_mp/web/fetch_mp_article_url_conversion`

<!-- Full path: /api/v1/wechat_mp/web/fetch_mp_article_url_conversion -->

### Parameters

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The installation instruction uses npx clawhub without pinning a specific version, which can cause users to execute whatever package version is current at install time. If the upstream package is compromised, typo-squatted, or updated with malicious behavior, users may unknowingly run attacker-controlled code during installation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The example trigger phrases are extremely broad and overlap with common user language, especially generic terms like '视频号', '视频', '公众号', and '文章'. In an agent environment, this can cause unintentional invocation of the skill on unrelated conversations, leading to over-broad data access, surprising behavior, or routing sensitive prompts to this skill without clear user intent.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The README instructs users to run npx clawhub install maxhub-wechat without pinning a specific version. This makes installation depend on whatever package version is current at execution time, which creates a supply-chain risk if the package is compromised or a breaking/malicious release is published later. In a skill-installation context, users are likely to copy-paste this command directly, increasing exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation tells users to configure an API key for a third-party service but does not warn that user queries and credentials will be sent to that external provider. This creates a transparency and privacy problem: users may unknowingly expose sensitive search terms or operational data to the service, and administrators may not realize the trust boundary involved.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The example trigger phrases are extremely broad (视频号,视频 / 公众号,文章) and overlap with common conversational language. In agent environments, overly generic triggers can cause accidental invocation, leading users to send queries to this third-party skill when they did not intend to, which is especially risky because the skill handles external data queries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file instructs the assistant to determine the user's language from the first message and maintain that language throughout the conversation. This enforces a language choice based on detection rather than explicit user preference, which can violate language/locale policy when no opt-in or override is offered.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The skill instructs the agent to send authenticated requests containing user-provided query parameters and a bearer token to an external third-party service. External transmission is expected for API-backed skills, but it remains a real security concern because user data and sensitive metadata leave the local environment, and the skill lacks minimization, allowlisting beyond the host, and explicit consent boundaries for what may be sent.

Content

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

md
maxhub_auth_header="Authorization: Bearer ${MAXHUB_API_KEY}"

# GET example
curl -s "https://www.aconfig.cn/api/v1/wechat/{endpoint}?{params}" \
  -H "$maxhub_auth_header"

# POST example

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The compliance declaration asserts that all endpoints in the skill are legitimate, read-only, and in-scope, but elsewhere the file includes references to endpoints for other platforms and undocumented behaviors. That misleading assurance can lower operator caution and encourage execution of out-of-scope calls under the guise of safety, which is risky in a skill that transmits authenticated requests to an external API.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger lists include generic terms such as "search", "detail", "comment", "find", "show me", and "analyze", which are common conversational phrases and not specific to this skill. The file does not provide exclusion conditions or negative examples, so it is unclear when these words should activate this skill versus ordinary dialogue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The instruction "ALL output matches user's detected language" imposes a language policy based on detection rather than an explicit user choice. Because no override or opt-in mechanism is provided, the skill may force a specific language/locale unexpectedly.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.