Back to skill

Security audit

小红书内容研究

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a read-only Xiaohongshu research helper, but it tells agents to run a mutable npm package at runtime with the user's API key exposed.

Install only if you are comfortable letting a current npm release of socialdatax-skills run locally with SOCIALDATAX_API_KEY available. Prefer a pinned reviewed package version or a controlled environment that exposes only that API key and limits filesystem and network access.

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
SKILL.md:33
Finding
Unpinned Third-Party Package Is Downloaded and Executed Automatically## Vulnerability Details **File Location**: `SKILL.md`, lines 33-39 **Vulnerability Type**: Unpinned npm dependency and mutable remote execution **Risk Level**: Medium **Complete Code Snippet**: ```bash npx -y socialdatax-skills@latest xhs search \ --keyword "<keyword>" --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill xhs-content-research npx -y socialdatax-skills@latest xhs search \ --keyword "<keyword>" --pages 3 --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill xhs-content-research ``` ### Technical Analysis The documented commands use `npx -y` to download and execute `socialdatax-skills@latest`. The `latest` npm distribution tag is mutable, meaning the code executed during a future invocation may differ from the code available when this Skill was reviewed. The `-y` option suppresses the package installation confirmation. The project contains no pinned package version, lockfile, recorded integrity hash, or vendored implementation with which to verify the downloaded executable. Consequently, the effective behavior cannot be established solely from the audited artifact. If the npm publisher account, package, release process, or upstream dependencies are compromised, a malicious release could run automatically when an agent follows these instructions. ### Attack Path 1. An attacker compromises the `socialdatax-skills` npm publisher account, release pipeline, package contents, or a relevant upstream dependency. 2. The attacker publishes a malicious package version and causes the mutable `latest` tag to reference it. 3. An agent follows the commands in `SKILL.md`. 4. `npx -y` retrieves the current remotely published package without requesting confirmation. 5. Node.js executes the downloaded package with the privileges and environment of the invoking agent or user. 6. The malicious package can access process-visible reso ...[truncated 882 chars]
Remediation
## Remediation Suggestions 1. Replace `socialdatax-skills@latest` with a reviewed, exact package version; do not use a mutable npm distribution tag or semantic version range. 2. Declare the package in a committed manifest and lockfile, then install it using a reproducible command such as `npm ci`. 3. Verify registry provenance and package integrity before execution. Preserve and validate the expected lockfile integrity metadata in CI and deployment workflows. 4. Remove automatic `-y` installation where interactive approval is appropriate, and separate dependency installation from normal Skill execution. 5. Review dependency updates before changing the pinned version, including package provenance, release diffs, maintainers, lifecycle scripts, and transitive dependency changes. 6. Run the CLI in a restricted environment with least privilege, limited filesystem access, controlled outbound networking, and only the required `SOCIALDATAX_API_KEY` exposed. 7. Avoid exposing unrelated secrets through inherited environment variables. Supply the API key only to the specific subprocess that requires it. 8. Where practical, mirror the approved package in a controlled registry or vendor and review the executable implementation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The skill instructs agents to execute `npx -y socialdatax-skills@latest ...`, which fetches and runs the newest package version at execution time rather than a fixed, reviewed release. If the upstream package is compromised, a malicious version is published, or a dependency in the supply chain is hijacked, the agent could execute attacker-controlled code with the user's local privileges and access to `SOCIALDATAX_API_KEY` and other environment data.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
This second command repeats the same risky pattern: dynamic execution of `socialdatax-skills@latest` through `npx`. Because the skill is explicitly designed for agent execution and requires an API key in the environment, the context increases risk: any malicious update could immediately run code and exfiltrate credentials or tamper with local files during normal use.

Static analysis

No suspicious patterns detected.