Back to skill

Security audit

xhs-search

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because scanners report several capabilities beyond its stated search purpose and security weaknesses; the scan was partial, so the evidence is incomplete.

Consider avoiding installation until the token exposure and insecure TLS mode are addressed, and until the extra collection and recharge capabilities are clearly explained or removed. The scan is incomplete: only two of seven components were fully inspected, so it cannot establish that unreported behavior is safe.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
src/config.js
Finding

Default public HTTP endpoint exposes bearer tokens

Content
View full analysis

Impact

An attacker can capture the token and replay authenticated requests while it remains valid, exposing account task results and allowing consumption of account points.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (9)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是小红书搜索结果采集工具,但所给代码仅调用 logout 子命令。注销账户或会话既不是所声明的主要功能,也没有证据表明它是搜索采集的必要实现细节。由于未提供 cli.js 的实现,无法确认实际注销效果,但可见命令的用途已与声明明显不符。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description discloses point costs and refunds, but does not disclose automatic recharge-order creation or an integrated payment workflow. These are consequential additional capabilities rather than ordinary search or export implementation details. The code does not itself complete payment or debit a payment method; the user must pay externally. Although this module may support a larger search tool, its automatic financial-order creation is not accurately represented by the declared purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied module exposes concrete request methods for unrelated collection workflows, including /profile/sessions, /comments/sessions, /dy/danmaku/sessions, and multiple other platforms' comment-session endpoints. These capabilities materially exceed a Xiaohongshu keyword-search collector. Authentication, generic task/export handling, and request metadata are supporting implementation details and are not themselves mismatches. The extra methods only issue requests when called; this chunk does not show that they run automatically. Search filtering, CSV formatting, and the stated billing/refund guarantees cannot be verified from this client module alone.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Standalone triggers such as “选题” (topic ideation) can activate the skill without Xiaohongshu search intent.

Medium
Category
Trigger Abuse
Confidence
96% confidence
Finding

The description explicitly activates the skill when the user mentions “选题”, “关键词采集”, or “搜索结果导出”. These phrases also describe general content planning and searches on unrelated platforms, and the trigger clause does not require Xiaohongshu context.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

When invoked, allowInsecureTls disables TLS certificate verification process-wide, allowing an active network attacker to impersonate HTTPS services and intercept bearer tokens or modify API responses. This is an optional insecure mode rather than a demonstrated default, but its effects extend beyond one request, and stderr warnings do not restore server authentication.

Content

Scanner excerpt · src/client.js (reported line 75)May include surrounding context.

js
/** 忽略 HTTPS 证书校验 (服务端自签/域名不匹配证书时由 insecure 配置开启)。进程级。 */
function allowInsecureTls() {
  process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
}

/** 业务错误: code 为后端错误码 (1001/1002/3001/...) */

The exported client exposes profile, comment, and cross-platform collection workflows unrelated to Xiaohongshu keyword search.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The manifest limits this skill to Xiaohongshu keyword-search result collection and export, but the client implements Xiaohongshu profile collection (L178–L205), full comment collection (L257–L282), and collection workflows for unrelated platforms, including Douyin danmaku (L207–L233) and numerous platform-specific comment APIs (L284–L520). These methods can create and advance remote collection sessions using the configured API credentials; they are additional callable capabilities, not necessary implementation details of keyword search, although this file does not show them being invoked.

Content

No source excerpt is available for this finding.

The search skill automatically creates monetary recharge orders, beyond its declared search and credit-accounting behavior.

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

The manifest describes keyword searches, exports, and usage-based credit deductions/refunds, but does not disclose automatic recharge-order creation. On insufficient credits, handleFatal invokes rechargeFlow without confirmation (L175–L176), which selects a default amount and posts a recharge order (L113–L124), including in noninteractive agent runs. This creates a financial order rather than merely reporting insufficient credits; it does not itself complete payment, which still requires the user to scan and pay.

Content

No source excerpt is available for this finding.

The registration workflow mandates a Chinese-language response verbatim without user language choice.

Low
Category
Output Handling
Confidence
91% confidence
Finding

Line 136 requires the agent to send the registration guidance unchanged, and the prescribed message is entirely in Chinese. This goes beyond documenting the skill in Chinese: it mandates user-facing Chinese output without offering language choice or permitting translation.

Content

No source excerpt is available for this finding.