Back to skill

Security audit

Xiaohongshu Mcp Publisher

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly purpose-aligned for Xiaohongshu publishing, but it asks users to rely on unverified third-party login/publishing executables and uses stored session cookies without enough safeguards or confirmation controls.

Install only if you are comfortable trusting the referenced Xiaohongshu MCP project and its login utility with your account session. Verify the upstream source and release artifacts yourself, run the service in a constrained environment if possible, protect or delete the temporary cookie file after use, and require the agent to show the exact title, body, tags, and images for approval before any publish call.

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

Warning
Location
references/mcp-config.md:5
Finding

Unverified Third-Party Authentication Executables

Content
View full analysis

Vulnerability Details

File Location: references/mcp-config.md:5-25
Vulnerability Type: Unverified third-party executable dependency
Risk Level: Medium

Vulnerable Code Snippet

text
https://github.com/xpzouying/xiaohongshu-mcp
bash
./xiaohongshu-mcp-{platform} [-headless] [-port :18060]
./xiaohongshu-login-{platform}

Technical Analysis

The installation documentation directs users to obtain and execute an MCP service and login utility from a mutable personal GitHub repository. It does not pin an immutable release or commit, provide cryptographic checksums or signatures, identify verified release artifacts, or require a reviewed and reproducible source build.

These executables have access to the user's Xiaohongshu authentication workflow and stored session cookies. Consequently, compromise of the upstream repository, its release artifacts, or the download channel could introduce modified executable code after this Skill has already been reviewed. The issue is therefore an insecure software supply-chain dependency rather than confirmed malicious behavior within the repository itself.

The same unpinned upstream repository is also referenced in SKILL.md:68.

Attack Path

  1. An attacker compromises the referenced repository, its maintainer account, or a release artifact.
  2. The attacker replaces the expected MCP server or login executable with a modified binary.
  3. A user follows the Skill documentation and downloads the executable without checksum or signature verification.
  4. The user runs the modified login utility or MCP service with their normal operating-system privileges.
  5. The executable captures Xiaohongshu session data, performs unauthorized account actions, reads files accessible to the user, or executes other code under the user's account.

Impact Assessment

Successful exploitation could provide the malicious dependency with the same local privileges as th ...[truncated 458 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to a specific reviewed release and immutable commit hash.
  2. Provide exact release artifact URLs rather than directing users to a mutable repository landing page.
  3. Publish SHA-256 or stronger checksums for every supported platform and require verification before execution.
  4. Prefer cryptographically signed release artifacts and document signature verification using a pinned maintainer key.
  5. Where practical, require building from the pinned source revision through a documented and reproducible build process.
  6. Run the MCP server and login utility with least privilege in an isolated account or sandbox with restricted filesystem and network access.
  7. Document where cookies are stored, apply restrictive file permissions, and ensure session data is not exposed to unrelated local processes.
  8. Establish a dependency-update review process so that version changes trigger renewed source and artifact verification.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个端到端的小红书自动化运营技能,覆盖搜索新闻、生成内容、生成封面和发布等多个环节;但提供的代码片段只包含 gen_cover.py,一个使用 PIL 在本地生成封面图的脚本。它不包含任何网络搜索、内容抓取、文本生成、平台登录、发布动作或自动化编排逻辑。虽然“生成封面图”这一子能力与声明部分一致,但整体声明显著夸大了代码实际能力,因此属于描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description presents a broad, multi-stage automation skill covering news search, content generation, cover generation, and full publishing workflow. However, the actual code only performs one narrow function: publishing a Xiaohongshu note through a local service after checking login status. There is no implementation for searching news, generating post text, generating a cover image, or orchestrating a complete automated pipeline. The publishing capability itself is consistent with part of the description, but the declared purpose materially overstates the implemented behavior, so this is a mismatch.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill instructs use of network-capable actions such as web_search and direct HTTP requests to a local MCP publishing service, but it does not declare any explicit tool scope or allowed-tools boundary. Missing permission scoping increases the risk of unintended network access or broader-than-expected tool use when an agent executes the workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly describes automated publication to a logged-in Xiaohongshu account via a publish API, yet it does not include a strong warning or confirmation requirement that account content will be posted or modified. In this context, the capability is more dangerous because it targets a real authenticated social-media account and can cause unauthorized posting, reputational harm, spam, or policy violations if triggered unintentionally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire template is written as a prescriptive content format for 小红书 copy in Chinese, and it does not indicate that language selection is optional or user-driven. Under the language/locale policy, forcing a specific language without opt-in can be a natural-language policy violation unless the regional constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document states that login cookies are stored in a temporary file and automatically loaded by the MCP service, but it does not warn that these cookies are effectively authentication secrets. If local users, other processes, backups, or weak temp-directory permissions expose that file, an attacker could hijack the Xiaohongshu session and publish or act as the account owner. In this automation/publishing skill, session theft is more dangerous because it enables unattended misuse of a social-media account.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language documentation entirely in Chinese, including the module docstring and CLI usage/help context, with no indication that the user can choose another language. The policy explicitly flags language or locale constraints when a skill forces a specific language without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/publish.py (reported line 56)May include surrounding context.

python
print(f"   图片: {len(payload['images'])} 张")
    
    try:
        resp = requests.post(
            f"{BASE_URL}/api/v1/publish",
            json=payload,
            timeout=TIMEOUT

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. This file presents all instructions in Chinese only, with no indication that the user can select another language and no documented reason that the skill must be Chinese-only.

Content

No source excerpt is available for this finding.