Back to skill

Security audit

soap-cut-video

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to generate WeryAI videos as advertised, but its helper script can send the WeryAI API key to configurable network endpoints, so it needs review before use.

Install only if you are comfortable sending prompts, public image URLs, and generation metadata to WeryAI. Keep WERYAI_BASE_URL and WERYAI_MODELS_BASE_URL unset unless they point to trusted HTTPS WeryAI-compatible endpoints, and use a limited or revocable WERYAI_API_KEY because misuse could consume credits or expose task metadata.

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/video_gen.js:22
Finding

Unrestricted API endpoint overrides can disclose bearer credentials

Content
View full analysis

Vulnerability Details

File Location: scripts/video_gen.js, lines 22–25 and 70–79
Vulnerability Type: Credential disclosure through unrestricted network destination configuration
Risk Level: Medium

Vulnerable Code

js
const BASE_URL = (process.env.WERYAI_BASE_URL || 'https://api.weryai.com').replace(/\/$/, '');
const MODELS_BASE_URL = (process.env.WERYAI_MODELS_BASE_URL || 'https://api-growth-agent.weryai.com').replace(
  /\/$/,
  '',
);
js
async function httpJson(method, fullUrl, body, apiKey) {
  const headers = {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  };
  const controller = new AbortController();
  const timer = setTimeout(() => controller.abort(), 30_000);
  try {
    const res = await fetch(fullUrl, {
      method,
      headers,
      body: body != null ? JSON.stringify(body) : undefined,
      signal: controller.signal,
    });

Technical Analysis

The script permits WERYAI_BASE_URL and WERYAI_MODELS_BASE_URL to specify arbitrary network destinations. It does not validate the URL scheme or restrict the hostname to trusted WeryAI domains.

The shared httpJson function attaches the WERYAI_API_KEY as a bearer credential to every request, regardless of the selected destination. Consequently, a modified runtime environment can redirect credential-bearing requests to an untrusted host. An http:// destination can additionally expose the API key and request data to interception or modification in transit.

Sending prompts, public image URLs, generation parameters, and authentication information to the legitimate WeryAI service is necessary for the declared cloud video-generation functionality. However, unrestricted endpoint overrides exceed the minimum privileges required because normal operation only needs access to the documented WeryAI endpoints.

Attack Path

  1. An attacker or compromised launcher g ...[truncated 1589 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove endpoint overrides if custom WeryAI deployments are not an explicit functional requirement. Use fixed vendor endpoints:

    • https://api.weryai.com
    • https://api-growth-agent.weryai.com
  2. If endpoint customization is required, parse each value with new URL() and reject it unless:

    • The protocol is exactly https:.
    • The hostname is present on an explicit allowlist.
    • Embedded usernames and passwords are absent.
    • Unexpected ports are rejected or explicitly approved.
  3. Bind credentials to origins. Do not send the production WeryAI API key to a custom origin. Require a separate credential variable for any separately trusted deployment.

  4. Fail closed when URL validation fails. Do not silently fall back to an arbitrary or plaintext endpoint.

  5. Document the approved destinations and warn operators that environment variables controlling authenticated network destinations are security-sensitive.

  6. Add automated tests confirming that attacker-controlled hosts, plaintext HTTP URLs, malformed URLs, embedded credentials, and unapproved ports are rejected before any request is made.

  7. Rotate WERYAI_API_KEY if the Skill has previously run with an endpoint configuration that cannot be verified as trusted.

Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (3)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**依赖**:本目录 `scripts/video_gen.js` + 运行环境需设置 `WERYAI_API_KEY` + Node.js 18+。不依赖其他 Cursor 技能。

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes a Node.js script that requires both an environment secret (WERYAI_API_KEY) and network access, but the manifest does not declare any tool scope or permissions to constrain those capabilities. This creates an over-privileged and opaque execution model where the skill can access sensitive environment data and make outbound requests without explicit review boundaries, increasing the risk of secret misuse or unexpected data exfiltration.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language comments that describe usage, commands, examples, and environment variables exclusively in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is justified, which is not indicated here.

Content

No source excerpt is available for this finding.