Back to skill

Security audit

xhs-public-data-guaikei

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does what it says, but it sends its API token in URL query strings and can collect large amounts of public social-media data through a third-party service.

Install only if you are comfortable sending Xiaohongshu keywords, profile/note URLs, and returned public content through guaikei.com. Treat GUAIKEI_API_TOKEN as a real credential; because this version sends it in URL query parameters, use a limited-scope token if possible, monitor quota usage, and rotate the token if logs or service access are a concern.

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/utils/request.js:86
Finding

API Token Exposed in URL Query Strings

Content
View full analysis

Vulnerability Details

File Location: src/api/search.js:23-26, src/api/search.js:52-59, src/api/detail.js:20-23, src/api/detail.js:46-50, src/api/post.js:20-23, src/api/post.js:46-50, src/api/comment.js:20-23, src/api/comment.js:46-50, src/utils/request.js:86-98, and src/utils/request.js:108-119
Vulnerability Type: Sensitive credential exposure through URL query parameters
Risk Level: Medium

Vulnerable Code

The API modules place GUAIKEI_API_TOKEN into request parameter objects:

js
// src/api/search.js:23-26
return await postJson(
  "/api/xiaohongshu/note-search/keyword",
  { _: Date.now(), token: token },
  { keyword, type, sort, time, limit },
);
js
// src/api/search.js:52-59
const res = await getJson("/api/xiaohongshu/note-search/info", {
  _: Date.now(),
  token: token,
  keyword,
  type,
  sort,
  time,
  limit,
});

The same credential-handling pattern appears in the detail, post, and comment APIs:

js
// src/api/detail.js:20-23
return await postJson(
  "/api/xiaohongshu/detail/url",
  { _: Date.now(), token: token },
  { url: url, limit: limit },
);
js
// src/api/detail.js:46-50
const res = await getJson("/api/xiaohongshu/detail/info", {
  _: Date.now(),
  token: token,
  url: url,
  limit: limit,
});
js
// src/api/post.js:20-23
return await postJson(
  "/api/xiaohongshu/post/url",
  { _: Date.now(), token: token },
  { url, limit },
);
js
// src/api/post.js:46-50
const res = await getJson("/api/xiaohongshu/post/info", {
  _: Date.now(),
  token: token,
  url,
  limit,
});
js
// src/api/comment.js:20-23
return await postJson(
  "/api/xiaohongshu/comment/url",
  { _: Date.now(), token: token },
  { url, limit },
);
js
// src/api/comment.js:46-50
const res = await getJson("/api/xiaohongshu/comme
...[truncated 3762 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove token from all query parameter objects in the search, detail, post, and comment modules.

  2. Pass the credential separately to the request helper and place it in an HTTP authorization header:

    js
    const options = {
      host: constants.BASE_URL,
      path: fullPath,
      method: "POST",
      headers: {
        Authorization: `Bearer ${token}`,
        "Content-Type": "application/json",
        "Content-Length": Buffer.byteLength(jsonData),
      },
    };
    
  3. Apply the same authorization-header mechanism to polling requests instead of authenticating through GET query parameters.

  4. If the service does not support bearer authentication, introduce a dedicated secret-bearing header such as X-API-Key and update the server accordingly.

  5. Configure servers, gateways, proxies, tracing systems, and monitoring tools to redact Authorization, X-API-Key, and legacy token values.

  6. Avoid including complete request URLs in errors or diagnostics when they could contain credentials.

  7. Rotate existing API tokens because historical infrastructure logs may already contain them.

  8. Establish retention and access-control policies for any historical logs containing credential-bearing URLs.

  9. Add automated tests that assert no API credential appears in options.path, console output, saved result files, or error messages.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (81)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Platform-wide keyword search is materially broader than a specific blogger-analysis skill because it can discover unrelated creators and content. In context, that makes the mismatch more dangerous: the skill is framed as limited to a supplied homepage but can actually be used for wider scraping and content discovery.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Platform-wide keyword search is materially broader than a specific blogger-analysis skill because it can discover unrelated creators and content. In context, that makes the mismatch more dangerous: the skill is framed as limited to a supplied homepage but can actually be used for wider scraping and content discovery.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Platform-wide keyword search is materially broader than a specific blogger-analysis skill because it can discover unrelated creators and content. In context, that makes the mismatch more dangerous: the skill is framed as limited to a supplied homepage but can actually be used for wider scraping and content discovery.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Platform-wide keyword search is materially broader than a specific blogger-analysis skill because it can discover unrelated creators and content. In context, that makes the mismatch more dangerous: the skill is framed as limited to a supplied homepage but can actually be used for wider scraping and content discovery.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Platform-wide keyword search is materially broader than a specific blogger-analysis skill because it can discover unrelated creators and content. In context, that makes the mismatch more dangerous: the skill is framed as limited to a supplied homepage but can actually be used for wider scraping and content discovery.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Platform-wide keyword search is materially broader than a specific blogger-analysis skill because it can discover unrelated creators and content. In context, that makes the mismatch more dangerous: the skill is framed as limited to a supplied homepage but can actually be used for wider scraping and content discovery.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Platform-wide keyword search is materially broader than a specific blogger-analysis skill because it can discover unrelated creators and content. In context, that makes the mismatch more dangerous: the skill is framed as limited to a supplied homepage but can actually be used for wider scraping and content discovery.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Platform-wide keyword search is materially broader than a specific blogger-analysis skill because it can discover unrelated creators and content. In context, that makes the mismatch more dangerous: the skill is framed as limited to a supplied homepage but can actually be used for wider scraping and content discovery.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Platform-wide keyword search is materially broader than a specific blogger-analysis skill because it can discover unrelated creators and content. In context, that makes the mismatch more dangerous: the skill is framed as limited to a supplied homepage but can actually be used for wider scraping and content discovery.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Platform-wide keyword search is materially broader than a specific blogger-analysis skill because it can discover unrelated creators and content. In context, that makes the mismatch more dangerous: the skill is framed as limited to a supplied homepage but can actually be used for wider scraping and content discovery.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "分析这条小红书笔记评论区的主要观点和负面反馈: node src/xiaohongshu/detail-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "分析这条小红书笔记评论区的主要观点和负面反馈: node src/xiaohongshu/detail-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "分析这条小红书笔记评论区的主要观点和负面反馈: node src/xiaohongshu/detail-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "分析这条小红书笔记评论区的主要观点和负面反馈: node src/xiaohongshu/detail-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "分析这条小红书笔记评论区的主要观点和负面反馈: node src/xiaohongshu/detail-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "分析这条小红书笔记评论区的主要观点和负面反馈: node src/xiaohongshu/detail-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "看这个小红书博主最近 20 条作品都在发什么: node src/xiaohongshu/post-cli.js --url 'https://www.xiaohongshu.com/user/profile/xxx?xsec_token=yyy' --limit 20"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "看这个小红书博主最近 20 条作品都在发什么: node src/xiaohongshu/post-cli.js --url 'https://www.xiaohongshu.com/user/profile/xxx?xsec_token=yyy' --limit 20"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "看这个小红书博主最近 20 条作品都在发什么: node src/xiaohongshu/post-cli.js --url 'https://www.xiaohongshu.com/user/profile/xxx?xsec_token=yyy' --limit 20"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "看这个小红书博主最近 20 条作品都在发什么: node src/xiaohongshu/post-cli.js --url 'https://www.xiaohongshu.com/user/profile/xxx?xsec_token=yyy' --limit 20"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "看这个小红书博主最近 20 条作品都在发什么: node src/xiaohongshu/post-cli.js --url 'https://www.xiaohongshu.com/user/profile/xxx?xsec_token=yyy' --limit 20"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "只拉这条笔记的评论做观点归纳: node src/xiaohongshu/comment-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "只拉这条笔记的评论做观点归纳: node src/xiaohongshu/comment-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "只拉这条笔记的评论做观点归纳: node src/xiaohongshu/comment-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- "只拉这条笔记的评论做观点归纳: node src/xiaohongshu/comment-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"