Back to skill

Security audit

WeryAI Account

Security checks for vulnerabilities and agentic risk

Overview

The balance-check skill is mostly coherent, but it needs Review because it can send the WeryAI API key to an arbitrary configured host and includes unrelated generation-status code.

Install only if you trust the publisher and can keep `WERYAI_BASE_URL` unset or pinned to the official HTTPS WeryAI API. Use a limited WeryAI key where possible, rotate any key used with an untrusted base URL, and treat the bundled generation-status vendor files as unnecessary for a simple balance check.

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

Error
Location
scripts/account.js:12
Finding

API Key Disclosure Through an Unrestricted Base URL Override

Content
View full analysis
controller.abort(), 30000); try { const res = await fetch(url, { method, headers, signal: controller.signal, }); ``` ```js async function queryBalance(apiKey) { const res = await httpJson("GET", `${BASE_URL}/v1/generation/balance`, apiKey); ``` The documentation explicitly exposes the override without enforcing its security requirements: ```md - Optional override `WERYAI_BASE_URL` defaults to `https://api.weryai.com`. Only override it with a trusted host. ``` The vendored client implements the same unrestricted credential transmission pattern: ```js export function createClient(ctx) { const { apiKey, baseUrl, requestTimeoutMs, verbose } = ctx; async function request(method, path, body = null, { retries = 0 } = {}) { if (!apiKey) { throw Object.assign( new Error('Missing API key environment variable.'), { code: 'NO_API_KEY' }, ); } const url = `${baseUrl}${path}`; const headers = { Authorization: `Bearer ${apiKey}`, 'Content-Type': 'application/json', }; ``` ### Technical Analysis The balance operation legitimately needs to send `WERYAI_API_KEY` to the official WeryAI API. However, `WERYAI_BASE_URL` is accepted witho ...[truncated 2400 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Polling generation or batch task status, processing media URLs/lyrics/cover data, and handling completion/timeout logic is incompatible with a balance-check skill. This broadens the operational surface from a simple read-only account lookup to a more powerful workflow that can access other resources and mislead users about what their API key is being used for.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Polling generation or batch task status, processing media URLs/lyrics/cover data, and handling completion/timeout logic is incompatible with a balance-check skill. This broadens the operational surface from a simple read-only account lookup to a more powerful workflow that can access other resources and mislead users about what their API key is being used for.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Polling generation or batch task status, processing media URLs/lyrics/cover data, and handling completion/timeout logic is incompatible with a balance-check skill. This broadens the operational surface from a simple read-only account lookup to a more powerful workflow that can access other resources and mislead users about what their API key is being used for.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Polling generation or batch task status, processing media URLs/lyrics/cover data, and handling completion/timeout logic is incompatible with a balance-check skill. This broadens the operational surface from a simple read-only account lookup to a more powerful workflow that can access other resources and mislead users about what their API key is being used for.

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

md
**Dependencies:** `scripts/account.js` in this directory + `WERYAI_API_KEY` + Node.js 18+. No other Cursor skills are required.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Dependencies:** `scripts/account.js` in this directory + `WERYAI_API_KEY` + Node.js 18+. No other Cursor skills are required.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Dependencies:** `scripts/account.js` in this directory + `WERYAI_API_KEY` + Node.js 18+. No other Cursor skills are required.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The implementation does not perform the account-credit or API-balance check promised by the skill metadata; instead it queries generation task and batch status endpoints using attacker-controlled task or batch IDs. This creates a dangerous capability mismatch: a user invoking a seemingly low-risk account-check skill may unknowingly grant the agent access to unrelated generation-status data, which can expose task metadata or be abused for unauthorized enumeration of resources.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file implements long-running polling for generation task and batch status endpoints (/v1/generation/...), which is materially broader than the skill’s declared purpose of checking WeryAI account credits and API balance. In an agent-skill setting, capability mismatch is dangerous because it can enable undeclared paid content-generation workflows, create unexpected external API actions, and increase the blast radius beyond simple account inspection; the polling loops also support completion of prior generation jobs rather than balance-only access.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares environment and network capabilities via metadata, but does not explicitly constrain tool scope with permissions or allowed-tools. In a skill that handles an API secret and performs outbound requests, missing scope boundaries increases the chance that runtime behavior exceeds the user-visible contract or that future code changes silently gain broader access.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/account.js:12