Back to skill

Security audit

Xhs Surfer

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent as a Xiaohongshu automation tool, but it needs Review because it can automate account actions and private-message access through an unpinned external package without clear consent boundaries.

Install only if you are comfortable giving this package control over a Xiaohongshu browser session. Use a dedicated low-privilege account, avoid supplying reusable cookies unless necessary, keep unrelated API keys out of the environment, review or pin the PyPI package before use, and require explicit confirmation before any like, comment, follow, marketing, or private-message action.

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:13
Finding
Unpinned and Unauditable Third-Party Executable Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 13–15 and 32–33 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code ```yaml pypi: xhs-surfer emoji: "\U0001F4D5" homepage: https://github.com/MTXAI/xhs_suffer ``` ```bash # pip installation pip install xhs-surfer playwright install chromium ``` ### Technical Analysis The Skill directs users to install `xhs-surfer` from PyPI without specifying an exact version or cryptographic hash. Consequently, the code installed by this command can change after the Skill has been reviewed. The project contains only `SKILL.md`; it does not include the dependency's implementation, a lockfile, hashes, or other material sufficient to audit the executable package. The documented GitHub repository name, `xhs_suffer`, also differs from the package and Skill name, `xhs-surfer`. This discrepancy does not prove malicious activity, but it reduces provenance clarity and makes it more difficult for users to verify that the package and repository belong to the same trusted release. The package is intended to operate in a sensitive context. Other documented examples provide it with Xiaohongshu authentication cookies, access to private-message functionality, browser automation capabilities, and an environment where LLM API keys may be present. Therefore, dependency integrity is security-critical. ### Attack Path 1. A user or agent follows `SKILL.md` and executes `pip install xhs-surfer`. 2. Pip resolves whichever package release is current because no version or hash is required. 3. An attacker compromises the publisher account or release process, or otherwise causes a malicious package version to be distributed under that dependency name. 4. The malicious dependency executes with the user's privileges during installation, import, or invocation. 5. During documented use, the dependency can receive the cookie file and co ...[truncated 1072 chars]
Remediation
## Remediation Suggestions 1. Pin `xhs-surfer` to a specific, reviewed version rather than installing the latest available release. 2. Use a requirements or lock file with cryptographic hashes, and install with hash verification, such as `pip install --require-hashes`. 3. Pin and verify Playwright and its browser artifacts through a reproducible dependency-management process. 4. Include the Skill's executable source in the reviewed project, or provide an immutable source reference such as a verified release tag and commit digest. 5. Clarify and verify the relationship between the `xhs-surfer` package and the `xhs_suffer` repository. Align naming where possible and document package ownership and release provenance. 6. Publish signed releases and verify signatures or attestations before installation. 7. Run browser automation in a sandbox or dedicated low-privilege account with access limited to the files and environment variables required for the task. 8. Avoid exposing unrelated API keys or credentials to the process. Use narrowly scoped credentials and rotate them if dependency compromise is suspected. 9. Validate the selected package artifact in CI through source review, malware scanning, and reproducible build or provenance checks before deployment.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (2)

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill openly supports automated likes, comments, follows, and message checking but does not present prominent warnings about account risk, privacy exposure, platform-policy violations, or unintended interactions. This is especially risky in context because the documented API includes marketing automation and direct access to private messages, creating meaningful potential for spam, account sanctions, and unauthorized processing of private data.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The activation text is broad enough to trigger on ordinary browsing or search requests, which can cause the agent to invoke a browser-automation skill without the user explicitly consenting to automated actions. In this skill, that ambiguity is more dangerous because the tool can perform state-changing actions such as likes, comments, follows, and message access, not just passive retrieval.

Static analysis

No suspicious patterns detected.