Back to skill

Security audit

Haizei Worldcup 2026 Skill (2026年美加墨足球世界杯Skill)

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly fetches public World Cup data, but it needs review because it includes gambling-odds features, anti-bot-style request headers, and some broader-than-World-Cup behavior.

Install only if you are comfortable with a skill that scrapes public sports sites, uses rotating browser/mobile headers, and exposes betting odds. Treat odds and predictions as informational, check local gambling laws, avoid using it for betting decisions, and prefer explicit --wc filters when you only want World Cup data.

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/worldcup-match.js:40
Finding

Unbounded Buffering of Remote HTTP Responses

Content
View full analysis

Vulnerability Details

File Location: scripts/worldcup-match.js:40-45
Vulnerability Type: Uncontrolled resource consumption through unbounded response buffering
Risk Level: Medium

Vulnerable Code

js
const req = https.request(options, (res) => {
  const chunks = [];
  res.on('data', (chunk) => { chunks.push(chunk); });
  res.on('end', () => {
    resolve(Buffer.concat(chunks).toString('utf-8'));
  });
});

The same implementation pattern also appears in:

  • scripts/worldcup-player.js:40-45
  • scripts/worldcup-rankings.js:50-60
  • scripts/worldcup-rankings.js:82-87
  • scripts/worldcup-schedule.js:30-35
  • scripts/worldcup-team.js:44-49

Technical Analysis

The HTTP clients retain every received response chunk in an array and then create a second contiguous allocation with Buffer.concat. They do not enforce a maximum response size, validate the Content-Length header, or terminate a response after a byte threshold is exceeded.

The configured 15-second request timeout does not provide an effective response-size limit. If an upstream server continuously sends data, the process can continue accumulating chunks until memory is exhausted. The final Buffer.concat can temporarily require approximately another allocation equal to the complete response size, increasing peak memory consumption.

Exploitation requires control or compromise of a configured upstream service, or another condition causing that service to return an unexpectedly large response. The audited request URLs are otherwise constrained to the declared sports-data domains; no user-controlled host-based SSRF path was identified.

Attack Path

  1. An Agent invokes a documented command that retrieves data from Baidu Sports.
  2. The script establishes an HTTPS connection to the configured upstream endpoint.
  3. A compromised or malfunctioning upstream endpoint returns a very large response or continuously streams ...[truncated 877 chars]
Remediation
View remediation

Remediation Suggestions

  1. Enforce a conservative maximum response size and destroy the request immediately when the limit is exceeded:

    js
    const MAX_RESPONSE_BYTES = 5 * 1024 * 1024;
    
    const req = https.request(options, (res) => {
      const declaredLength = Number(res.headers['content-length'] || 0);
    
      if (declaredLength > MAX_RESPONSE_BYTES) {
        res.destroy();
        reject(new Error('Response exceeds the permitted size'));
        return;
      }
    
      const chunks = [];
      let receivedBytes = 0;
    
      res.on('data', (chunk) => {
        receivedBytes += chunk.length;
    
        if (receivedBytes > MAX_RESPONSE_BYTES) {
          res.destroy();
          reject(new Error('Response exceeds the permitted size'));
          return;
        }
    
        chunks.push(chunk);
      });
    
      res.on('end', () => {
        resolve(Buffer.concat(chunks, receivedBytes).toString('utf-8'));
      });
    
      res.on('error', reject);
    });
    
  2. Apply equivalent safeguards consistently to the HTTP helpers in:

    • scripts/worldcup-player.js
    • scripts/worldcup-rankings.js
    • scripts/worldcup-schedule.js
    • scripts/worldcup-team.js
  3. Validate status codes before consuming response bodies and reject unexpected redirects or error responses.

  4. Validate response media types, accepting only the expected HTML or JSON content types.

  5. Use streaming parsers where practical so complete documents do not need to be retained in memory.

  6. Configure Axios limits in scripts/worldcup-calculator.js, including maxContentLength, maxBodyLength, and an explicit timeout.

  7. Add tests using oversized and indefinitely streaming mock responses to verify that requests are terminated and memory remains bounded.

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

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the implementation is primarily local team/group lookup while the manifest advertises scraping, match details, rankings, and official odds, the discrepancy is significant. This is dangerous because users and calling agents may assign unjustified authority to the skill and act on incomplete or fabricated data, particularly in betting-adjacent scenarios.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the implementation is primarily local team/group lookup while the manifest advertises scraping, match details, rankings, and official odds, the discrepancy is significant. This is dangerous because users and calling agents may assign unjustified authority to the skill and act on incomplete or fabricated data, particularly in betting-adjacent scenarios.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the implementation is primarily local team/group lookup while the manifest advertises scraping, match details, rankings, and official odds, the discrepancy is significant. This is dangerous because users and calling agents may assign unjustified authority to the skill and act on incomplete or fabricated data, particularly in betting-adjacent scenarios.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the implementation is primarily local team/group lookup while the manifest advertises scraping, match details, rankings, and official odds, the discrepancy is significant. This is dangerous because users and calling agents may assign unjustified authority to the skill and act on incomplete or fabricated data, particularly in betting-adjacent scenarios.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the implementation is primarily local team/group lookup while the manifest advertises scraping, match details, rankings, and official odds, the discrepancy is significant. This is dangerous because users and calling agents may assign unjustified authority to the skill and act on incomplete or fabricated data, particularly in betting-adjacent scenarios.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the implementation is primarily local team/group lookup while the manifest advertises scraping, match details, rankings, and official odds, the discrepancy is significant. This is dangerous because users and calling agents may assign unjustified authority to the skill and act on incomplete or fabricated data, particularly in betting-adjacent scenarios.

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 46)May include surrounding context.

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**竞彩赔率**(`worldcup-calculator.js`,数据源:体彩官方):

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 全部赛程 / 今日赛程 / 按组按队查询 | `scripts/worldcup-schedule.js` | [schedule.md](references/schedule.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 全部赛程 / 今日赛程 / 按组按队查询 | `scripts/worldcup-schedule.js` | [schedule.md](references/schedule.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 全部赛程 / 今日赛程 / 按组按队查询 | `scripts/worldcup-schedule.js` | [schedule.md](references/schedule.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 全部赛程 / 今日赛程 / 按组按队查询 | `scripts/worldcup-schedule.js` | [schedule.md](references/schedule.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 全部赛程 / 今日赛程 / 按组按队查询 | `scripts/worldcup-schedule.js` | [schedule.md](references/schedule.md) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 全部赛程 / 今日赛程 / 按组按队查询 | `scripts/worldcup-schedule.js` | [schedule.md](references/schedule.md) |

Static analysis

No suspicious patterns detected.