Back to skill

Security audit

Xiaohongshu Mcp Node

Security checks for vulnerabilities and agentic risk

Overview

This skill is for real Xiaohongshu account automation, but its recommended installer and some account-action safeguards need careful review before use.

Install only after reviewing the installer or using manual, pinned steps; avoid piping remote scripts to bash. Treat the cookie file like a login credential, keep it in a private location, and require an explicit preview and confirmation before any publish, comment, like, or favorite action on your account.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
references/quick-start.md:10
Finding
Mutable Remote Installer Is Executed Directly Through Bash<![CDATA[ ## Vulnerability Details **File Location**: `references/quick-start.md:10` **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://raw.githubusercontent.com/sipingme/xiaohongshu-mcp-node-skill/main/install.sh | bash ``` ### Technical Analysis This command downloads `install.sh` from the mutable `main` branch of an external GitHub repository and immediately passes its contents to Bash. The installer is not included in the audited artifact, so its behavior could not be reviewed. The command provides no immutable commit pin, checksum verification, signature validation, or opportunity to inspect the downloaded script before execution. Although GitHub is a recognized hosting provider, hosting on GitHub does not establish the integrity of a repository or protect users if the maintainer account, repository, or referenced branch is compromised. Executing a remote script is not the minimum privilege necessary for the Skill's documented installation. The same guide provides a manual installation procedure, demonstrating that direct remote shell execution is avoidable. ### Attack Path 1. An attacker compromises the repository, maintainer account, or another mechanism capable of changing `install.sh` on the `main` branch. 2. The attacker adds arbitrary shell commands to the installer. 3. A user follows the recommended quick-start command. 4. `curl` retrieves the attacker's current payload without validating its identity or integrity. 5. Bash executes the payload with all privileges available to the invoking user. 6. The payload can access local files, alter configuration, install additional components, or establish persistence subject to those privileges. ### Impact Assessment Successful exploitation results in arbitrary command execution under the account running the installation command. Potentially accessible resources include: - User-owned files and credential ...[truncated 531 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the `curl | bash` installation method and do not describe it as recommended. 2. Prefer the documented manual installation process, allowing users to inspect the checked-out content before execution. 3. If an installer remains necessary: - Include the installer in the audited Skill artifact. - Reference an immutable release or full commit hash rather than `main`. - Publish a SHA-256 digest and a cryptographic signature through an independent trusted channel. - Download the file without executing it, verify its digest and signature, and instruct users to inspect it before running it. 4. Ensure the installer never requires root privileges unless a specific operation demonstrably requires them. 5. Document every file, package, browser component, and configuration entry modified by installation. 6. Provide reproducible release artifacts and protect repository releases with branch protection, signed commits or tags, and maintainer multi-factor authentication. ]]>

T08 · Insecure Dependencies

Warning
Location
references/quick-start.md:17
Finding
Unpinned Third-Party Packages and Browser Components Create Supply-Chain Exposure<![CDATA[ ## Vulnerability Details **File Location**: `references/quick-start.md:17-24` **Additional Locations**: `SKILL.md:73-80`, `SKILL.md:504`, `SKILL.md:590`, `references/faq.md:24`, `references/faq.md:189-192` **Vulnerability Type**: Unpinned dependency and executable component installation **Risk Level**: Medium ### Vulnerable Code ```bash # 1. Clone the project git clone https://github.com/sipingme/xiaohongshu-mcp-node-skill.git cd xiaohongshu-mcp-node-skill # 2. Install dependencies (automatically installs xiaohongshu-mcp-node) npm install # 3. Install the browser npx playwright install chromium ``` Related instructions also recommend mutable global installation and update operations: ```bash npm install -g xiaohongshu-mcp-node-skill npm install -g xiaohongshu-mcp-node xiaohongshu-mcp-node-skill npm update -g xiaohongshu-mcp-node xiaohongshu-mcp-node-skill npx playwright install chromium ``` ### Technical Analysis The installation instructions clone the repository's default branch and install dependencies without pinning the repository to an immutable commit or release. They also recommend global npm installation and update commands without explicit versions. `npm install`, `npm update`, and `npx` can retrieve mutable third-party packages or executable components. Global installation broadens the scope by placing package-provided executables in a shared user or system package location. The audited artifact contains no lockfile or package manifest, so dependency identities, versions, lifecycle scripts, and integrity metadata cannot be verified from the supplied files. Installing Node.js dependencies and Chromium is relevant to the declared MCP browser-automation functionality. However, mutable versions, global scope, and absent integrity verification exceed the safest minimum necessary installation model. No malicious npm package or browser binary was confirmed in the supplied artifact. This finding concerns the unsafe dependency acquisiti ...[truncated 1556 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the Skill and MCP server repositories to reviewed release tags and immutable commit hashes. 2. Include committed package manifests and lockfiles in the distributed artifact. 3. Replace `npm install` with `npm ci` so dependency versions and integrity metadata are enforced by the lockfile. 4. Pin direct package versions explicitly and review transitive dependencies and lifecycle scripts. 5. Avoid global installations. Install dependencies in a dedicated project directory or isolated runtime with only the filesystem and network access required by the MCP server. 6. Avoid unrestricted `npm update -g`; document a controlled upgrade process that verifies release provenance and reviews changes. 7. Pin Playwright and its browser revision through a reviewed lockfile and verify downloaded browser artifacts using supported integrity or provenance controls. 8. Run package installation without administrative privileges and consider disabling lifecycle scripts during initial inspection where operationally possible. 9. Generate and review a software bill of materials and use dependency scanning before publishing each release. ]]>
Vulnerability Patterns
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (16)

Chaining Abuse

High
Category
Tool Misuse
Content
### 自动安装(推荐)

```bash
curl -fsSL https://raw.githubusercontent.com/sipingme/xiaohongshu-mcp-node-skill/main/install.sh | bash
```

### 手动安装
Confidence
99% confidence
Finding
The `| bash` construct turns downloaded network content directly into shell input, eliminating any review barrier and making compromise of the source immediately lead to arbitrary command execution. In installation docs this is a classic high-risk chaining pattern and is more dangerous because it is marked as the recommended path.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill advertises automated posting and engagement actions without clearly requiring explicit user confirmation before irreversible social-media operations. In an agent setting, this increases the chance of accidental publication, unwanted interactions, or abuse of the user's authenticated account.

Rp1

Medium
Category
MCP Rug Pull
Confidence
74% confidence
Finding
The installation step invokes Playwright via an unpinned command, which weakens supply-chain reproducibility and can cause users to fetch an unexpected upstream version. In a skill that drives browser automation, dependency drift can introduce vulnerable code or behavioral changes without the operator noticing.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The login flow describes QR authentication and automatic cookie saving but does not prominently warn users about local storage, persistence, and sensitivity of authentication cookies. If users mishandle the cookie file, an attacker could reuse it to access the associated Xiaohongshu account.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The security section claims communications are limited to Xiaohongshu, but the document also states image inputs may come from arbitrary URLs and be auto-downloaded. That mismatch can mislead users about outbound network behavior and create SSRF-like or privacy risks if the tool fetches attacker-controlled URLs from trusted environments.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This markdown file is natural-language documentation, and all user-facing instructions are presented only in Chinese. Under the policy rule for language/locale, forcing a single language without user opt-in or a documented regional justification is a violation.

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.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
**安全措施**:
- Cookie 仅存储在本地
- 不会上传到任何服务器
- 建议设置文件权限:`chmod 600 cookies.json`

### Q19: 会不会被小红书封号?
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The guide recommends `curl ... | bash`, which downloads and immediately executes remote code from the repository's default branch without review or integrity verification. If the repository, branch, or delivery path is compromised, users will run attacker-controlled shell commands on their machine.

Rp1

Medium
Category
MCP Rug Pull
Confidence
83% confidence
Finding
The quick-start uses `npx playwright install chromium` without pinning a specific package version, so the resolved package may vary over time. In setup documentation this creates a supply-chain risk and weakens reproducibility, especially because users are encouraged to run it during installation of a skill that also automates account actions.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The publishing example shows a live `xhs-cli publish` workflow but does not clearly warn that it will post content to the user's actual Xiaohongshu account. In a skill for social-platform automation, omission of that warning increases the chance of unintended public posting, account misuse, or reputational harm.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
The manifest description and the full skill documentation appear to require Chinese for use, but there is no statement that the skill is Chinese-only by design or that users may choose another language. This can violate language/locale policy when a skill forces a specific language without opt-in or justification.

Intent-Code Divergence

Low
Confidence
95% confidence
Finding
The privacy text says all operations execute locally, but the documented core actions necessarily perform remote operations against Xiaohongshu. This is a deceptive or inaccurate assurance that can cause users to underestimate account, privacy, and audit implications of using the skill.

Natural-Language Policy Violations

Low
Confidence
80% confidence
Finding
The skill documentation forces a single language presentation throughout the file and does not indicate that the skill is intentionally limited to Chinese-speaking users or provide an alternate language option. Under the stated policy, imposing a language without opt-in can be a natural-language policy issue.

External Script Fetching

Low
Category
Supply Chain
Content
### 自动安装(推荐)

```bash
curl -fsSL https://raw.githubusercontent.com/sipingme/xiaohongshu-mcp-node-skill/main/install.sh | bash
```

### 手动安装
Confidence
97% confidence
Finding
The document instructs users to fetch a script from GitHub raw content and execute it locally. External script fetching is especially dangerous here because it is paired with immediate execution and targets end-user environments during installation.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The command table lists `like` and `comment` operations without any notice that they trigger real engagement actions on the logged-in account. Because this skill controls a live social-media account, users may invoke these actions unintentionally and create unauthorized or unwanted interactions.

Static analysis

No suspicious patterns detected.