Back to skill

Security audit

Minijuegos LeChuck SDK

Security checks for vulnerabilities and agentic risk

Overview

The skill is a legitimate Minijuegos integration guide, but its sample backend code can let authenticated users submit server-authorized stats for other players if copied as written.

Install only if you will treat the backend snippets as patterns to harden, not production-ready code. Derive miniplay_id from the authenticated server-side session, validate and bound all stats, return only an explicit public user field allowlist, redact token-bearing URLs from logs, and keep MINIPLAY_API_KEY and JWT_SECRET exclusively on the server.

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

T09 · Insecure Skill Coding Practices

Error
Location
references/backend.md:84
Finding

Authenticated Users Can Submit Statistics for Other Players

Content
View full analysis
{ const { miniplay_id, stats } = req.body; // MINIPLAY_API_KEY authorizes server-to-server write calls const signature = createHmac('sha256', process.env.MINIPLAY_API_KEY) .update(`${miniplay_id}:${stats.kills}:${stats.plays}`) .digest('hex'); // Example: push stats to Minijuegos server-side endpoint await fetch(`https://api.minijuegos.com/lechuck/server/user/${miniplay_id}/stats/`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Api-Id': process.env.MINIPLAY_API_ID, 'X-Api-Key': process.env.MINIPLAY_API_KEY, 'X-Signature': signature, }, body: JSON.stringify(stats), }); res.json({ ok: true }); }); ``` ### Technical Analysis The route requires authentication, but it takes the target `miniplay_id` directly from the client-controlled request body. It does not verify that this identifier belongs to the authenticated session. Consequently, possession of any valid account session may be sufficient to make the backend issue privileged, server-signed statistics updates for another Minijuegos user. The server attaches `MINIPLAY_API_KEY` and a generated HMAC to the outbound request, converting an otherwise untrusted client request into an authorized provider request. The `stats` object is also forwarded without schema, range, or semantic validation. Depending on the provider's validation, an attacker may submit fabricated, negative, excessively large, or unexpected values. ### Attack Path 1. The attacker authenticates through the normal Minijuegos flow and receives a valid application session. 2. The attacker obtains or guesses another p ...[truncated 978 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/backend.md:47
Finding

Authentication Endpoint Returns an Unrestricted User Database Row

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (10)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Validate the token server-side before creating a user. See `references/backend.md` for the full endpoint, DB schema, and where `MINIPLAY_API_KEY` is used.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Validate the token server-side before creating a user. See `references/backend.md` for the full endpoint, DB schema, and where `MINIPLAY_API_KEY` is used.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/backend.md (reported line 151)May include surrounding context.

text

> **Important:** `MINIPLAY_API_ID` is used in the token validation `GET` URL — it appears in request logs.
> `MINIPLAY_API_KEY` is the write-access secret and must only exist on the server.
> These are two different credentials with different sensitivity levels.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
Validate the token server-side before creating a user. See `references/backend.md` for the full endpoint, DB schema, and where `MINIPLAY_API_KEY` is used.

Key points:
- Validate token: `GET https://api.minijuegos.com/lechuck/client-js/user/{uid}/authenticate/?api_id=XXXX&user_token={tok}&mobile=0&locale=es_ES`
- If `status.success = true` → valid; HTTP 403 with `status.success = false` → invalid
- If `email` is NOT NULL in your DB, use a synthetic email: `miniplay_{uid}@miniplay.local`
- Add `miniplay_id VARCHAR(64) UNIQUE` column to your users table

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/backend.md (reported line 90)May include surrounding context.

md
Validate the token server-side before creating a user. See `references/backend.md` for the full endpoint, DB schema, and where `MINIPLAY_API_KEY` is used.

Key points:
- Validate token: `GET https://api.minijuegos.com/lechuck/client-js/user/{uid}/authenticate/?api_id=XXXX&user_token={tok}&mobile=0&locale=es_ES`
- If `status.success = true` → valid; HTTP 403 with `status.success = false` → invalid
- If `email` is NOT NULL in your DB, use a synthetic email: `miniplay_{uid}@miniplay.local`
- Add `miniplay_id VARCHAR(64) UNIQUE` column to your users table

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation instructs implementers to use locale=es_ES in the token validation request. This imposes a specific locale by default, and the file does not state that the integration is region-specific or that users can opt into a different language/locale.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The documented authentication flow sends user_token in a URL query string to an external service. Query parameters are commonly logged by servers, proxies, monitoring tools, and browser/network infrastructure, which can leak bearer-style credentials and enable replay or account impersonation if logs are exposed.

Content

Scanner excerpt · references/backend.md (reported line 13)May include surrounding context.

Token Validation Endpoint

text
GET https://api.minijuegos.com/lechuck/client-js/user/{user_id}/authenticate/
  ?api_id={API_ID}
  &user_token={token}
  &mobile=0

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The sample backend constructs a validation URL containing user_token as a query string and transmits it to a third party. Even over HTTPS, the full URL may still be captured in application logs, exception traces, proxy logs, or observability tooling, creating avoidable credential exposure in a sensitive authentication path.

Content

Scanner excerpt · references/backend.md (reported line 37)May include surrounding context.

md
// 1. Validate token with Minijuegos API
  // MINIPLAY_API_ID is the public identifier — visible in this URL
  const validateUrl = `https://api.minijuegos.com/lechuck/client-js/user/${miniplay_id}/authenticate/`
    + `?api_id=${process.env.MINIPLAY_API_ID}&user_token=${token}&mobile=0&locale=es_ES`;

  let mpData;

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The token-validation example fixes locale=es_ES, which imposes a specific language/locale in the documented flow. The file does not indicate that this locale is optional, configurable, or limited to a justified region-specific deployment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The sample backend code constructs the validation URL with locale=es_ES, forcing a specific locale in runtime behavior. There is no user opt-in or documented rationale showing that the integration is intentionally Spain/Spanish-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.