Back to skill

Security audit

Xhs Expert

Security checks for vulnerabilities and agentic risk

Overview

This Xiaohongshu automation skill is disclosed as an operations tool, but it combines account-changing actions, bulk engagement, browser stealth, and plaintext session persistence without enough enforced user control.

Review this skill carefully before installing. It can automate real Xiaohongshu account actions, store login material locally, scrape and save platform data, and hide browser automation signals. Use only with an account you are willing to risk, avoid bulk actions unless you have manually reviewed every target, and treat the stored cookie/profile files as sensitive credentials.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cookie_manager.py:45
Finding

Authentication Cookies Are Persisted Without Restrictive File Permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cookie_manager.py:27
Finding

User-Controlled Profile Name Allows Filesystem Path Traversal

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cli.py:219
Finding

Mandatory Confirmation and Login Safeguards Are Not Enforced for Account-Changing Operations

Content
View full analysis
5)** - 显示目标范围,等待确认 3. **关注用户** - 显示用户信息,等待确认 ``` The comment command executes immediately in `scripts/cli.py:219-236`: ```python @interact_group.command("comment") @click.option("--note-id", "-n", required=True, help="笔记ID") @click.option("--content", "-c", required=True, help="评论内容") def interact_comment(note_id, content): """发表评论""" async def run(): client = XHSClient() await client.load_cookies() handler = InteractionHandler(client) result = await handler.comment(note_id, content) emoji = "✅" if result.result.value == "success" else "❌" click.echo(f"{emoji} {result.message}") await client.close() asyncio.run(run()) ``` The follow command executes immediately in `scripts/cli.py:239-261`: ```python @interact_group.command("follow") @click.option("--user-id", "-u", required=True, help="用户ID") @click.option("--action", "-a", default="add", type=click.Choice(["add", "remove"]), help="操作: add关注, remove取消") def interact_follow(user_id, action): """关注/取消关注用户""" async def run(): client = XHSClient() await client.load_cookies() handler = InteractionHandler(client) if action == "add": result = await handler.follow(user_id) else: result = await handler.unfollow(user_id) emoji = "✅" if result.result.value == "success" else "❌" click.echo(f"{emoji} {result.message}") await client.close() asyncio.run(run()) ``` The batch-like command has no confirmation or maximum size in `s ...[truncated 2651 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (31)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose frames the skill as a Xiaohongshu operations assistant, but the documentation also includes browser automation startup, CDP connectivity, stealth injection, and profile isolation. Those capabilities materially expand the attack surface into anti-detection automation and privileged browser control, which are more sensitive than ordinary search or analytics and can enable covert account actions or evasion of platform safeguards.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose frames the skill as a Xiaohongshu operations assistant, but the documentation also includes browser automation startup, CDP connectivity, stealth injection, and profile isolation. Those capabilities materially expand the attack surface into anti-detection automation and privileged browser control, which are more sensitive than ordinary search or analytics and can enable covert account actions or evasion of platform safeguards.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared purpose frames the skill as a Xiaohongshu operations assistant, but the documentation also includes browser automation startup, CDP connectivity, stealth injection, and profile isolation. Those capabilities materially expand the attack surface into anti-detection automation and privileged browser control, which are more sensitive than ordinary search or analytics and can enable covert account actions or evasion of platform safeguards.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared purpose frames the skill as a Xiaohongshu operations assistant, but the documentation also includes browser automation startup, CDP connectivity, stealth injection, and profile isolation. Those capabilities materially expand the attack surface into anti-detection automation and privileged browser control, which are more sensitive than ordinary search or analytics and can enable covert account actions or evasion of platform safeguards.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The launcher explicitly advertises and implements stealth/evasion to bypass browser automation detection, including disabling AutomationControlled and concealing automation fingerprints. In the context of a bulk XHS operations skill that performs likes, comments, follows, and account operations, this materially increases abuse capability by helping the agent evade platform defenses and operate deceptive automation at scale.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code tampers with navigator.webdriver, plugins, languages, window.chrome, and known automation marker properties to disguise automated control from websites. This is a direct concealment mechanism, and within a social-media growth/interaction skill it enables deceptive engagement, account farming, or policy-violating automation while making detection harder.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises capabilities that imply file access, cookie persistence, and network/browser automation, but it does not declare any explicit tool scope or permission boundaries. This makes the effective authority of the skill opaque, increasing the risk of over-privileged execution and making it harder for users or the platform to constrain sensitive actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill advertises data collection, cookie persistence, and account interaction, but it does not present a clear up-front warning about privacy risks, stored authentication material, or the consequences of automated likes/comments/follows. In this context, weak disclosure is dangerous because users may unknowingly authorize scraping and account actions that affect personal data, account integrity, or platform compliance.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match ordinary discussion about Xiaohongshu operations, analytics, or content, which can cause the skill to activate unexpectedly. Because the skill includes account-affecting actions and data collection, overbroad routing increases the chance of unintended invocation of sensitive capabilities.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill's safety section forbids generic browser-based operation, yet the same file endorses Playwright/Chrome automation and Selenium injection. This contradiction weakens operator trust, makes safeguards unenforceable, and may normalize hidden browser automation despite ostensibly restrictive policy language.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Recommending Selenium-based signature injection explicitly introduces an anti-detection and request-forging capability. In the context of a social-platform automation skill, this can be used to bypass platform protections, automate actions under a user's account, and conceal activity that would otherwise be blocked or rate-limited.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Forcing Chinese-preferred browser languages without user choice modifies the browser fingerprint to impersonate a regional user profile and may be used to blend automated traffic into a target platform's expected locale. In this skill's context, that strengthens evasion and deceptive targeting rather than serving a clearly documented functional requirement.

Content

No source excerpt is available for this finding.

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · scripts/chrome_launcher.py (reported line 138)May include surrounding context.

python
try:
            import aiohttp
            async with aiohttp.ClientSession() as session:
                async with session.get(
                    f"http://localhost:{self.port}/json/version"
                ) as resp:
                    if resp.status == 200:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring and command/help text throughout the CLI are written exclusively in Chinese, with no indication that users can choose another language or locale. This imposes a language constraint on all users rather than offering an opt-in or clearly documenting a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The interact comment command triggers a real external account action using the authenticated Xiaohongshu account and accepts arbitrary comment text without any confirmation, dry-run mode, or explicit warning that it will post publicly. In a skill explicitly designed for bulk social-media operations, this increases the risk of accidental posting, spammy automation, or misuse of the user's account and reputation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code persists authentication cookies, including likely session tokens such as web_session and a1, to a predictable plaintext file under the user's home directory without encryption, permission hardening, or an explicit user warning. In the context of an automation skill that supports multi-account operation and browser login reuse, theft of this file could allow session hijacking and unauthorized access to Xiaohongshu accounts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code performs remote collection of platform content and related data without any built-in notice, consent, or purpose limitation. In a scraping/operations skill, silent collection increases privacy and compliance risk because users and operators may not be clearly informed that third-party content and metadata are being harvested over the network.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file’s documented scope is search/detail/comment collection, but it also implements bulk collection of arbitrary users’ posted notes via user_id. In the context of an account-operations and bulk-interaction skill, this broadens surveillance capability and enables targeted profiling or mass harvesting beyond what a user may reasonably expect from the module description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Collected notes are persisted locally to a predictable directory under the user’s home folder without an explicit warning, retention control, or access protections. This creates a privacy and data-governance risk because scraped content may remain on disk longer than intended and be accessible to other local processes or users depending on system configuration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The batch interaction methods enable automated likes, collects, and comments against an external platform with no built-in confirmation, authorization gate, scope limit, or stronger anti-abuse controls beyond a simple delay. In the context of an XHS运营/批量互动 skill, this directly facilitates mass engagement actions that can violate platform rules, cause account sanctions, and be abused for spam or inauthentic engagement at scale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The parser explicitly exposes an xsec-token from embedded page state without any access control, purpose limitation, auditability, or user disclosure. In the context of a XiaoHongShu automation skill that also supports search, data collection, and batch interactions, surfacing a request/authentication token increases the risk of unauthorized API use, session abuse, and bypass of intended platform controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The client persists cookies and authentication-related values (including X-s, X-t, device_id, and a1) to a predictable file under the user's home directory without any access-control hardening, encryption, or explicit user consent. In the context of a bulk-operation XiaoHongShu automation skill, these values can enable session reuse or account takeover if another local process, user, or backup/sync system can read the file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The request method attaches cookies to outbound headers and sends POST bodies to remote endpoints, which can include user content and session identifiers. The code contains no visible prompt, logging, or user-facing notice that account/session data and request content will be transmitted over the network.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The natural-language description identifies the skill specifically as '小红书运营专家技能', which implies a Chinese-language and China-platform focus without stating that this locale/language constraint is optional or user-selected. Under the policy, forced language or locale behavior should be documented as opt-in or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: httpx has 2 known advisory(ies) (CVE-2021-41945 (Improper Input Validation in httpx); CVE-2021-41945 (Encode OSS httpx <=1.0.0.beta0 is affected by improper input validation in `http)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
79% confidence
Finding

The manifest specifies httpx with only a minimum version, so dependency resolution may select a release with known advisories or an unreviewed future release. In a skill that performs network access and likely processes remote content, leaving the version range open increases supply-chain and runtime exposure because the deployed package version cannot be verified as safe from the manifest alone.

Content

No source excerpt is available for this finding.