T03 · Remote Payload Retrieval and Execution
- Location
scripts/setup.py:19- Finding
Mutable, Unverified Third-Party Binaries Are Downloaded and Executed
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real Xiaohongshu research helper, but it installs and runs unverified downloaded binaries, stores login cookies, and has an undocumented endpoint override that can send research data outside localhost.
Review this before installing if you are comfortable running unaudited third-party binaries tied to a Xiaohongshu login. Prefer a version that pins and verifies downloaded releases, restricts the API endpoint to localhost unless you explicitly opt in, and documents how to delete cookies, logs, binaries, and saved reports.
scripts/setup.py:19Mutable, Unverified Third-Party Binaries Are Downloaded and Executed
scripts/xhs_research.py:30Environment-Controlled API Endpoint Can Receive Search Queries and Xiaohongshu Access Tokens
The declared purpose omits process management, health checks, port-bound local services, log creation, and use of persistent authentication state. In context, this makes the skill more dangerous because it handles browser login state and background service operation while appearing to be a straightforward content-research helper, which can mislead users about the security-sensitive side effects.
The declared purpose omits process management, health checks, port-bound local services, log creation, and use of persistent authentication state. In context, this makes the skill more dangerous because it handles browser login state and background service operation while appearing to be a straightforward content-research helper, which can mislead users about the security-sensitive side effects.
The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.
The skill uses 'network' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
info(f"Starting {os.path.basename(mcp_bin)} on port {MCP_PORT}...")
env = os.environ.copy()
env["COOKIES_PATH"] = COOKIES_PATH
try:
The README encourages automatic dependency installation and browser-based login while downplaying the implications of local persistence. Because the skill stores a login cookie and downloaded executable components under user directories, users may unknowingly leave reusable authentication material and third-party code on disk, increasing risk from local compromise, token theft, or unsafe updates. In this context, the danger is elevated because the tool explicitly handles authenticated access to a user account and auto-installs an external MCP component.
The README tells users that scanning a QR code is the only required action and later documents a persistent cookie file path, but it does not clearly warn that authentication cookies will be stored locally and can grant ongoing access to the user's account. In a skill that automates login to a consumer platform, lack of explicit notice about credential persistence increases the risk of unintended account exposure, especially on shared machines or when users ask another agent/tool to modify local code and files.
The skill instructions, examples, status messages, and required user-facing outputs are written entirely in Chinese and prescribe exact Chinese phrases to show the user, such as the login notice and follow-up prompts. There is no indication that the user may choose another language or that the skill is intentionally limited to a Chinese-only compliance context, which creates a natural-language locale policy concern.
This is a duplicate persistence issue at the same location: the skill directs writing session-derived output to disk in a stable, user-accessible directory. In this skill's context, that is more concerning because the workflow also involves login state and personalized research topics, making the saved artifacts potentially privacy-sensitive.
合成完报告后,用 Write 工具保存到本地:
路径:~/Documents/XHS-Research/{主题}-{YYYYMMDD}.md
This is a duplicate persistence issue at the same location: the skill directs writing session-derived output to disk in a stable, user-accessible directory. In this skill's context, that is more concerning because the workflow also involves login state and personalized research topics, making the saved artifacts potentially privacy-sensitive.
合成完报告后,用 Write 工具保存到本地:
路径:~/Documents/XHS-Research/{主题}-{YYYYMMDD}.md
The file header says this is a '语音转文字工具' research report, while the skill manifest says the skill is a general Xiaohongshu research tool for searching notes and synthesizing reports. This is an active documentation contradiction about what topic/output this artifact represents, not merely an omitted detail.
This skill bundles a SessionStart hook that automatically executes a local Python script whenever the skill/session lifecycle event fires. Auto-executing bundled code increases attack surface because users may trigger code execution simply by enabling or starting the skill, without a narrow scope or explicit per-use confirmation in this file.
The empty matcher means the SessionStart hook applies broadly, so the Python command will run on every session start rather than only in a narrowly defined context. That makes unintended or surprise code execution more likely and increases the blast radius of any unsafe behavior in the hooked script.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print()
try:
result = subprocess.run([login_bin], cwd=XHS_DIR)
if result.returncode != 0:
fail(f"Login process exited with code {result.returncode}")
sys.exit(1)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
ok, fail, info,
)
GITHUB_API = f"https://api.github.com/repos/{MCP_REPO}/releases/latest"
def download_mcp_binaries() -> bool:
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
try:
log_path = os.path.join(BIN_DIR, "mcp-server.log")
log_file = open(log_path, "a")
subprocess.Popen(
[mcp_bin, "-port", f":{MCP_PORT}", "-headless"],
env=env, stdout=log_file, stderr=log_file,
start_new_session=True,
The skill is described as requiring the Xiaohongshu app and QR-code login to research content on a Chinese platform, and the examples and workflow implicitly assume Chinese-platform usage. While this may be practical for the service, the file does not explicitly offer language/locale choice or clearly document the locale restriction as an intentional region-specific limitation.
The README presents the skill as specifically for Xiaohongshu research and all invocation examples, prompts, and output framing are in Chinese, with no indication that users can choose another language or locale. This can be a natural-language locale constraint that is not offered as an opt-in choice.
This markdown file is entirely presented in Chinese from the title onward, with no indication that the language is optional or that the skill/report is specifically intended for a Chinese-only audience. Under the language/locale policy rule, forcing a specific language without opt-in can be a natural-language policy concern.