Back to skill

Security audit

小红书种草数据采集

Security checks for vulnerabilities and agentic risk

Overview

This skill is mainly a Xiaohongshu data lookup tool, but it can send sensitive session cookies and proxy credentials to a third-party API, so users should review it carefully before installing.

Install only if you trust MaxHub/aconfig.cn with the data you query and any credentials you provide. Avoid using primary Xiaohongshu accounts, avoid cookie/proxy-dependent endpoints unless necessary, use a dedicated test account where possible, and rotate or revoke any cookies or proxy credentials after use. Prefer a pinned or otherwise verified installer rather than running the mutable npx command as-is.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
SKILL.md:65
Finding

Transmission of Reusable Session Cookies and Proxy Credentials to a Third-Party Service

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:65-76, references/api-note.md:1095-1119, references/api-note.md:2054-2077
Vulnerability Type: Sensitive credential exposure to a third-party API
Risk Level: High

Vulnerable Code Snippets

SKILL.md:65-76:

markdown
> ⚠️ **Credential Handling**
> - Some endpoints require platform session cookies. Only provide cookies if you fully trust the service provider.
> - Prefer scoped OAuth/API tokens over full browser cookies. Use separate test accounts when possible.
> - Rotate or revoke cookies after use.

> 📋 **Data Transmission**
> - All API requests are sent to `https://www.aconfig.cn`. Your credentials are transmitted to this third-party service.
> - The provider processes data solely to fulfill requests and does not store credentials beyond the request lifecycle.

references/api-note.md:1095-1119 documents the following credential-bearing endpoint:

markdown
## get_note_info_v5

`POST /api/v1/xiaohongshu/web/get_note_info_v5`

<!-- Full path: /api/v1/xiaohongshu/web/get_note_info_v5 -->

### Parameters

No parameters required.

### Response

Standard MaxHub response: `{code, message, message_zh, data, cache_url}`

### Description

- Retrieves note information using a logged-in web cookie supplied by the user.
- Inputs include:
  - `note_id`
  - `xsec_token`
  - A logged-in web `cookie`
  - An authenticated proxy in the following format:

http://username:password@IP:port

references/api-note.md:2054-2077 documents a signing operation that accepts a cookie:

markdown
## sign

`POST /api/v1/xiaohongshu/web/sign`

<!-- Full path: /api/v1/xiaohongshu/web/sign -->

### Parameters

No parameters required.

### Response

Standard MaxHub response: `{code, message, message_zh, data, cache_url}`

### Description

- Generates `X-s`, `X-t`, and `X-s-common` signature parameters.
- `sign_request` co
...[truncated 3097 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove support for full browser session cookies from the default Skill workflow.
  2. Use cookie-free and public-data endpoints whenever they can satisfy the request.
  3. Isolate cookie-dependent features into a separate, explicitly enabled Skill with a separate permission boundary.
  4. Require informed, per-request user consent before transmitting any platform credential.
  5. Accept only narrowly scoped, short-lived tokens rather than full browser cookies.
  6. Reject cookies belonging to privileged or primary user accounts and recommend dedicated test accounts.
  7. Never place cookies, tokens, or authenticated proxy URLs in query strings, logs, error messages, telemetry, cache keys, or generated output.
  8. Remove support for proxy URLs containing embedded usernames and passwords. If proxy support is necessary, retrieve credentials from a dedicated secret store and prevent disclosure to the model.
  9. Apply strict destination allowlisting so platform credentials cannot be sent to arbitrary hosts or redirected to another origin.
  10. Disable redirects for credential-bearing requests or strip authorization and cookie material before following any redirect.
  11. Publish enforceable retention, encryption, access-control, incident-response, and deletion policies for provider-side credential handling.
  12. Add automated secret redaction and tests that verify sensitive values never appear in command output or logs.
  13. Revoke and rotate any cookies or proxy credentials previously supplied through this workflow.

T08 · Insecure Dependencies

Warning
Location
README.md:14
Finding

Unpinned Remote Package Execution in Installation Instructions

Content
View full analysis

Vulnerability Details

File Location: README.md:14-18, README_CN.md:14-18
Vulnerability Type: Mutable package execution through an unpinned npx dependency
Risk Level: Medium

Vulnerable Code Snippet

README.md:14-18 and README_CN.md:14-18:

bash
npx clawhub install maxhub-xiaohongshu

Technical Analysis

The installation command invokes clawhub through npx without specifying an exact package version or integrity digest. Depending on local npm configuration and cache state, npx may download and execute the package currently published under that name.

This makes the installation behavior mutable after the Skill has been reviewed. A compromised publisher account, malicious future package version, registry compromise, dependency compromise, or name-resolution issue could cause users to execute code different from the code assessed in this audit.

The command also installs maxhub-xiaohongshu without pinning a Skill version or verifying the installed artifact against a checksum or signature. Consequently, neither the installer nor the resulting Skill package is reproducibly tied to the audited revision.

No evidence was found that the current clawhub package or repository is malicious. The vulnerability is the absence of supply-chain pinning and verification.

Attack Path

  1. An attacker compromises the package publisher, registry entry, release pipeline, or one of the installer's transitive dependencies.
  2. The attacker publishes a malicious version under the package name resolved by npx.
  3. A user follows the documented command after the malicious release becomes current.
  4. npx downloads and executes the mutable package with the user's local privileges.
  5. The malicious installer can access files, environment variables, credentials, or network resources available to that user.
  6. The installer may also deploy a modified Skill whose behavior differs from the reviewed re ...[truncated 814 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the installer to a reviewed exact version, for example by using an explicit immutable version rather than the current latest release.
  2. Pin the installed Skill to a specific release or commit corresponding to the audited source.
  3. Publish and verify cryptographic checksums or signatures for both the installer and Skill artifact.
  4. Document the expected npm registry, package scope, publisher identity, repository, and release-signing key.
  5. Use a lockfile with integrity metadata for development and reproducible installation workflows.
  6. Prefer a locally installed, previously verified CLI instead of executing an automatically downloaded package through npx.
  7. Run installation in a sandbox or least-privileged environment without unrelated credentials in the process environment.
  8. Add release provenance, such as signed tags and verifiable build attestations.
  9. Keep the English and Chinese installation documentation synchronized with the hardened command.
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (85)

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill directly tells users that some endpoints require platform session cookies and suggests providing them to the service provider. Browser session cookies can grant privileged access to user accounts and are far more sensitive than API keys, so encouraging their transfer to a third party is a significant credential-handling flaw.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 90)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
70% confidence
Finding

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

Content

Scanner excerpt · SKILL.md (reported line 90)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` | ✅ 使用替代端点(见废弃标注) |

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The security declaration says the APIs are legitimate read-only analysis tools, but the documented endpoint set includes token, signature, fingerprint, and visitor-cookie style utilities. That contradiction is dangerous because it downplays capabilities commonly associated with session bootstrapping, identity emulation, or access circumvention, preventing users from making informed trust decisions.

Content

No source excerpt is available for this finding.

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 242)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.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A Xiaohongshu skill unexpectedly includes Douyin-specific fallback paths, indicating either copy-paste contamination or multi-platform behavior not disclosed in the manifest. This can cause requests to be routed to unintended services or use the wrong parameter semantics, expanding data exposure and creating opportunities for misuse or unauthorized collection.

Content

No source excerpt is available for this finding.

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-note.md (reported line 11)May include surrounding context.

md
`GET /api/v1/xiaohongshu/app/extract_share_info`

<!-- Full path: /api/v1/xiaohongshu/app/extract_share_info -->

### 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-note.md (reported line 72)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web_v2/fetch_feed_notes_v3`

<!-- Full path: /api/v1/xiaohongshu/web_v2/fetch_feed_notes_v3 -->

### 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-note.md (reported line 122)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web_v2/fetch_feed_notes_v5`

<!-- Full path: /api/v1/xiaohongshu/web_v2/fetch_feed_notes_v5 -->

### 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-note.md (reported line 176)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web_v2/fetch_home_notes_app`

<!-- Full path: /api/v1/xiaohongshu/web_v2/fetch_home_notes_app -->

### 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-note.md (reported line 236)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web_v3/fetch_homefeed_categories`

<!-- Full path: /api/v1/xiaohongshu/web_v3/fetch_homefeed_categories -->

### 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-note.md (reported line 280)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web_v2/fetch_note_comments`

<!-- Full path: /api/v1/xiaohongshu/web_v2/fetch_note_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-note.md (reported line 338)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web_v3/fetch_note_detail`

<!-- Full path: /api/v1/xiaohongshu/web_v3/fetch_note_detail -->

### 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-note.md (reported line 392)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web_v2/fetch_search_notes`

<!-- Full path: /api/v1/xiaohongshu/web_v2/fetch_search_notes -->

### 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-note.md (reported line 467)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web_v2/fetch_sub_comments`

<!-- Full path: /api/v1/xiaohongshu/web_v2/fetch_sub_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-note.md (reported line 531)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web_v2/fetch_user_info`

<!-- Full path: /api/v1/xiaohongshu/web_v2/fetch_user_info -->

### 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-note.md (reported line 583)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web_v2/fetch_user_info_app`

<!-- Full path: /api/v1/xiaohongshu/web_v2/fetch_user_info_app -->

### 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-note.md (reported line 639)May include surrounding context.

md
`GET /api/v1/xiaohongshu/app_v2/get_creator_hot_inspiration_feed`

<!-- Full path: /api/v1/xiaohongshu/app_v2/get_creator_hot_inspiration_feed -->

### 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-note.md (reported line 667)May include surrounding context.

md
`GET /api/v1/xiaohongshu/app_v2/get_creator_inspiration_feed`

<!-- Full path: /api/v1/xiaohongshu/app_v2/get_creator_inspiration_feed -->

### 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-note.md (reported line 699)May include surrounding context.

md
`POST /api/v1/xiaohongshu/web/get_home_recommend`

<!-- Full path: /api/v1/xiaohongshu/web/get_home_recommend -->

### 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-note.md (reported line 739)May include surrounding context.

md
`GET /api/v1/xiaohongshu/app_v2/get_image_note_detail`

<!-- Full path: /api/v1/xiaohongshu/app_v2/get_image_note_detail -->

### 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-note.md (reported line 769)May include surrounding context.

md
`GET /api/v1/xiaohongshu/web/get_note_comment_replies`

<!-- Full path: /api/v1/xiaohongshu/web/get_note_comment_replies -->

### 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-note.md (reported line 800)May include surrounding context.

md
> ⚠️ **参数校验提示**:`note_id` 为必填参数,格式为 24 位十六进制字符串(如 `65a1b2c3d4e5f6a7b8c9d0e1`)。

<!-- Full path: /api/v1/xiaohongshu/app/get_note_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-note.md (reported line 852)May include surrounding context.

md
`GET /api/v1/xiaohongshu/app/get_note_comments`

<!-- Full path: /api/v1/xiaohongshu/app_v2/get_note_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-note.md (reported line 894)May include surrounding context.

md
`GET /api/v1/xiaohongshu/app/get_note_comments`

<!-- Full path: /api/v1/xiaohongshu/web/get_note_comments -->

### Parameters

Static analysis

No suspicious patterns detected.