Back to skill

Security audit

xhs-publish

Security checks for vulnerabilities and agentic risk

Overview

This uploader needs review because it can close existing editing tabs, change drafts during dry runs, and upload videos to an incorrectly selected page.

Before running, require fixes for automatic tab closure, exact site/account/draft selection, and dry-run checks before any changes. Use a dedicated browser profile, preserve existing drafts, configure the hardcoded paths, and review locally retained screenshots and inventories. Keep publishing and deletion explicitly user-approved.

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
scripts/xhs-draft-ep.js
Finding

Substring-based browser target selection can upload local videos to an attacker-controlled page

Content
View full analysis

Impact

The attacker can obtain the selected local video without authorization to receive it. Subsequent editor checks occur after file access is granted and cannot prevent the disclosure.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 321)May include surrounding context.

md
1. `xhs-draft-ep.js`(上传 + 标题 + 正文 + 话题 + 原创 + 合集,`NO_CHAPTER=1` 可跳过章节)

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

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill declares no tool scope despite directing local script execution and CDP access to a persistent, authenticated Chrome session. These capabilities permit public posting, irreversible draft deletion, and access to browser targets beyond the intended workflow, making unconstrained execution consequential. The documented dry-run and submission checks reduce accidental actions but do not enforce tool or account boundaries; there is no evidence here of malicious intent or exfiltration.

Content

No source excerpt is available for this finding.

Closes unrelated creator tabs in the user's real Chrome session when no blank upload tab is found (L055–L065).

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

If no blank upload tab is found, the script closes every tab whose URL contains creator.xiaohongshu.com, including unrelated editing sessions that may contain unsaved work. Because this skill controls the user's existing authenticated Chrome rather than an isolated browser, this cleanup can cause data loss outside the requested draft operation; the comment indicates intentional housekeeping rather than malicious intent.

Content

No source excerpt is available for this finding.

DRY=1 claims to scan without clicking, but browser mutations occur before the dry-run check.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

DRY=1 is checked only after the script has closed duplicate editor tabs, dismissed or removed dialogs, clicked original-content declaration controls, and potentially changed the selected collection. These actions contradict the scan-only message and can discard unsaved work or alter account content and declarations; attaching to an already authenticated browser makes those side effects consequential, although this branch does prevent the final save-button click.

Content

No source excerpt is available for this finding.

A screenshot of the draft page is saved locally without disclosure.

Low
Category
Output Handling
Confidence
90% confidence
Finding

The script writes a screenshot of the creator page to the SHOT directory, potentially retaining private draft content. No confirmation, log message, or explanatory comment discloses this capture, which is separate from the stated purpose of uploading a draft.

Content

No source excerpt is available for this finding.

The script silently saves a screenshot of the draft editor to a local PNG file.

Low
Category
Output Handling
Confidence
97% confidence
Finding

The screenshot persists potentially private draft content under the configured SHOT directory. No prompt, log, or explanatory comment discloses this capture, and saving screenshots is not part of the script's stated purpose of repairing draft metadata.

Content

No source excerpt is available for this finding.