Back to skill

Security audit

小红书运营助手

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Xiaohongshu assistant purpose, but a remote server can supply decrypted Markdown scoring instructions that may steer the agent’s answers.

Install only if you are comfortable with qianhaistonepark.site supplying the data and scoring rubric. Treat decoded scoring content as untrusted reference material, not as instructions to override the user, system, tools, or safety rules; avoid using the skill for sensitive private account analysis unless that boundary is added.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:139
Finding

Untrusted Remote Scoring Prompt Can Hijack Agent Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:139-155, with automatic decryption behavior additionally declared at SKILL.md:174
Vulnerability Type: Remote prompt injection through server-controlled scoring criteria
Risk Level: Medium

Vulnerable Documentation Segment

The following is an English translation of the relevant segment from SKILL.md:139-155; endpoint names and JSON fields are preserved exactly:

markdown
## 4. Xiaohongshu scoring-criteria prompt endpoint
Prompt: Evaluate the user's nickname, profile, note title, and note content
according to the criteria returned by the following endpoint, using a
ten-point scale, and provide recommendations based on those criteria.

GET /xhs/get_score_prompt

| Parameter | Type    | Default | Description |
|-----------|---------|---------|-------------|
| type      | integer | 1       | 1: nickname/profile criteria; 2: note-title criteria; 3: note-content criteria |

{
  "score_prompt": "string",
  "_field_comments": {
    "score_prompt": "Requires decoding; decoded content is Markdown"
  }
}

The security note at SKILL.md:174 further states that the Agent automatically decrypts and displays the plaintext content.

Technical Analysis

The Skill instructs the Agent to retrieve score_prompt from the mutable third-party service at https://qianhaistonepark.site/, decrypt it, and use the resulting Markdown as evaluation criteria. The returned content is therefore capable of influencing the Agent's active instructions.

No validation, strict schema for the decoded prompt contents, cryptographic signature verification, content pinning, or instruction/data boundary is defined. The XOR and Base64 transformation in scripts/tool.py only obscures the response; it does not authenticate its source or prevent modification. Its key material is also embedded in the distributed package.

Consequently, anyone who compromises or controls the ...[truncated 1914 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove remote instructions where possible: Store the scoring rubric as reviewed, version-controlled local content rather than retrieving executable prompt material from a third-party endpoint.
  2. Treat remote responses strictly as data: Explicitly instruct the Agent that decoded API content is untrusted reference data and that commands, role changes, tool requests, or policy statements inside it must never be followed.
  3. Use a constrained schema: Replace free-form Markdown with structured scoring fields such as criterion name, weight, description, and maximum score. Reject unknown fields and enforce length and character limits.
  4. Authenticate responses: Sign scoring-rubric payloads with a private server key and verify them locally using a pinned public key. XOR and Base64 must not be treated as integrity or authenticity controls.
  5. Pin approved content: Validate the rubric against an allowlisted version or cryptographic digest before it can influence an evaluation.
  6. Apply prompt-injection filtering: Reject content containing attempts to change roles, override instructions, request tools, access secrets, communicate externally, or alter unrelated behavior.
  7. Use fail-closed behavior: If verification or schema validation fails, report that scoring criteria could not be obtained and do not use the returned content.
  8. Minimize remote influence: Keep evaluation logic local and use the service only to retrieve factual Xiaohongshu data required for the declared functionality.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个面向小红书内容抓取与评价分析的技能,但提供的代码块实际只是在本地进行字符串加密解密。代码没有网络请求、没有访问小红书账号或笔记数据、没有热点话题处理、也没有任何评分模型或评价逻辑。因此其主要用途与声明严重不符,属于明显的描述—行为不匹配。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest trigger list includes very short and generic phrases such as "小红书" and "xhs", plus broad topic labels like "官方笔记" and "账号诊断". These can overlap with ordinary discussion about the platform rather than a clear request to invoke this specific skill, and the file does not provide exclusion conditions or negative examples.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

GET /xhs/get_op_note_list

text
- ### 请求参数(全部可选)
| 参数              | 类型      | 默认值 | 说明                                                                                                            |
|-----------------|---------|-----|---------------------------------------------------------------------------------------------------------------|
| `page`          | integer | 1   | 页码,从 1 开始  ,参数最大为 100,超出会被服务端限制为 100。                                                                         |
| `page_size`     | integer | 20  | 每页记录数,最大 100                                                                                                  |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| 参数              | 类型      | 默认值 | 说明                                                                                                            |
|-----------------|---------|-----|---------------------------------------------------------------------------------------------------------------|
| `page`          | integer | 1   | 页码,从 1 开始  ,参数最大为 100,超出会被服务端限制为 100。                                                                         |
| `page_size`     | integer | 20  | 每页记录数,最大 100                                                                                                  |
| `note_account`  | string  | -   | 笔记账号,精确匹配 ,帐号可由/xhs/get_op_account_list接口获取,中文使用URL编码                                                         |
| `note_type`     | string  | -   | 笔记类型,精确匹配,包括创作类,综合类,安全类,周边类,美妆类,生活类,学习求职类,娱乐类,运动类,旅行类,摄影类,艺术类,直播带货类,家居类,宠物类,运营类,美食类,公益类,数码类,汽车类,游戏类,中文使用URL编码 |
| `note_desc`     | string  | -   | 笔记描述,模糊包含匹配(不区分大小写),中文使用URL编码;模糊匹配是基于内存的字符串包含,性能与缓存数据量成正比(通常 < 10 万条无压力)。                                                                                |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

| page_size | integer | 20 | 每页记录数,最大 100 | | note_account | string | - | 笔记账号,精确匹配 ,帐号可由/xhs/get_op_account_list接口获取,中文使用URL编码 | | note_type | string | - | 笔记类型,精确匹配,包括创作类,综合类,安全类,周边类,美妆类,生活类,学习求职类,娱乐类,运动类,旅行类,摄影类,艺术类,直播带货类,家居类,宠物类,运营类,美食类,公益类,数码类,汽车类,游戏类,中文使用URL编码 | | note_desc | string | - | 笔记描述,模糊包含匹配(不区分大小写),中文使用URL编码;模糊匹配是基于内存的字符串包含,性能与缓存数据量成正比(通常 < 10 万条无压力)。 |

  • 响应格式

JSON 数组,每个元素包含以下字段:

json

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This file implements generic XOR-based obfuscation utilities that do not align with the stated Xiaohongshu retrieval/scoring purpose, which is a strong indicator of hidden or undeclared functionality. In an agent skill, unexplained reversible encoding can be used to conceal data handling, bypass review, or exfiltrate information in a less obvious form.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file’s natural-language guidance is written entirely in Chinese and explicitly references users in different countries without offering any language or locale choice. This can violate language/locale policy where skills should not force a specific language absent user opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The addition of reversible encryption/decryption capability is unjustified by the skill's advertised behavior and creates covert data transformation functionality inside the agent. Because the scheme is weak and deterministic by day, it is not real security, but it can still be used to obscure sensitive content from operators, logs, or reviewers.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
70% confidence
Finding

The skill description, triggers, and operating instructions are entirely in Chinese and imply Chinese-language interaction without stating that users may choose another language. This can conflict with language/locale choice expectations when the skill is used in broader multilingual environments.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.