Back to skill

Security audit

WeryAI video tool — lips change

Security checks for vulnerabilities and agentic risk

Overview

This skill is a narrowly scoped WeryAI lip-sync wrapper, but users should only pass the two documented media URLs because extra JSON fields are not stripped before submission.

Install only if you are comfortable sending the selected video URL, audio URL, and API-authenticated request to WeryAI. Use dry-run first, confirm paid submissions explicitly, and provide only the documented video_url and audio_url fields with public HTTPS media URLs.

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

Warning
Location
scripts/video_lips_change.js:78
Finding

Unrestricted JSON Fields Are Transmitted to the External WeryAI API

Content
View full analysis

Vulnerability Details

File Location: scripts/video_lips_change.js, lines 78-81 and 260-261
Vulnerability Type: Excessive data transmission caused by missing input allowlisting
Risk Level: Medium

Vulnerable Code

javascript
function buildPayload(spec, input) {
  const payload = { ...spec.defaults, ...(input || {}) };
  if (typeof spec.preparePayload === "function") spec.preparePayload(payload);
  if (payload.rect_vo_list != null) payload.rect_vo_list = normalizeRectList(payload.rect_vo_list);
  return payload;
}
javascript
async function submitTool(spec, payload, apiKey) {
  const res = await httpJson("POST", BASE_URL + spec.endpoint, payload, apiKey);

Technical Analysis

The documented interface accepts only video_url and audio_url, but buildPayload copies every property from the parsed --json object into the outbound payload. Validation verifies that required fields exist and validates known URL fields, but it does not reject or remove unknown properties.

The resulting payload is serialized in full and sent to the fixed external endpoint at https://api.weryai.com. Consequently, arbitrary additional fields—including credentials, tokens, personal data, internal identifiers, or prompt-derived confidential content—can be transmitted despite being outside the declared data requirements of the skill.

Sending the API key to the fixed WeryAI endpoint is necessary for the declared functionality. The security issue is the lack of minimization for the request body, which exceeds the documented input scope.

Attack Path

  1. An attacker, user, or upstream agent constructs a JSON argument containing the required URLs and an additional sensitive field:
    json
    {
      "video_url": "https://example.com/video.mp4",
      "audio_url": "https://example.com/audio.mp3",
      "secret": "sensitive-value"
    }
    
  2. parseJsonInput parses the object without ap ...[truncated 706 chars]
Remediation
View remediation

Remediation Suggestions

Construct the outbound request from an explicit allowlist rather than copying the complete input object:

javascript
function buildPayload(spec, input = {}) {
  return {
    video_url: input.video_url,
    audio_url: input.audio_url,
  };
}

Additionally:

  1. Reject unknown keys and return a validation error identifying them.
  2. Define a strict JSON schema with additionalProperties: false.
  3. Keep dry-run previews, but ensure they display only the allowlisted payload.
  4. Add tests proving that fields such as api_key, token, password, and arbitrary nested objects are rejected and never reach fetch.
  5. Document precisely which fields are transmitted to WeryAI and avoid logging request bodies that may contain media URLs or credentials.

T09 · Insecure Skill Coding Practices

Note
Location
scripts/video_lips_change.js:84
Finding

HTTPS Prefix Check Does Not Enforce Public Media URLs

Content
View full analysis

Vulnerability Details

File Location: scripts/video_lips_change.js, lines 84-91
Vulnerability Type: Insufficient URL validation for remotely fetched media
Risk Level: Low

Vulnerable Code

javascript
function validateHttpsUrl(value, fieldName, errors) {
  if (typeof value !== "string" || value.trim().length === 0) {
    errors.push(`${fieldName} must be a non-empty URL string.`);
    return;
  }
  if (!value.startsWith("https://")) {
    errors.push(`${fieldName} must be a public https:// URL.`);
  }
}

Technical Analysis

The function equates the literal https:// prefix with a valid public HTTPS URL. It does not parse the URL or verify its hostname, credentials, port, address class, or public reachability.

Inputs such as credential-bearing URLs, loopback addresses, private IP literals, link-local addresses, and internal hostnames can therefore pass validation. These values are subsequently included in the request sent to WeryAI, whose lip-sync workflow is expected to retrieve the referenced media.

This is not a direct local SSRF vulnerability in the Node.js process because the script itself does not retrieve the supplied media URL. The retrieval risk exists at the external WeryAI service boundary. The script nevertheless fails to enforce its documented promise that inputs must be public URLs.

Attack Path

  1. An attacker supplies a value that begins with https:// but is not an appropriate public media URL, such as:
    text
    https://user:secret@example.com/video.mp4
    
    or:
    text
    https://127.0.0.1/private-resource
    
  2. validateHttpsUrl accepts the value because it begins with the required prefix.
  3. The URL is embedded in the POST body and sent to WeryAI.
  4. Credentials embedded in the URL are disclosed to the API provider. If the provider attempts retrieval without adequate server-side SSRF protections, it may also attempt to access a ...[truncated 575 chars]
Remediation
View remediation

Remediation Suggestions

Replace prefix validation with structured URL parsing and explicit policy checks:

javascript
function validateHttpsUrl(value, fieldName, errors) {
  let parsed;
  try {
    parsed = new URL(value);
  } catch {
    errors.push(`${fieldName} must be a valid URL.`);
    return;
  }

  if (parsed.protocol !== "https:") {
    errors.push(`${fieldName} must use HTTPS.`);
  }
  if (parsed.username || parsed.password) {
    errors.push(`${fieldName} must not contain embedded credentials.`);
  }
}

Further hardening should:

  1. Reject localhost, loopback, private, link-local, multicast, unspecified, and reserved IP literals.
  2. Reject unsupported ports if the workflow requires standard HTTPS.
  3. Require WeryAI to enforce equivalent checks after DNS resolution and on every redirect to prevent DNS rebinding and redirect-based SSRF.
  4. Consider an allowlist of approved media-hosting domains where operationally feasible.
  5. Add tests for malformed URLs, embedded credentials, IPv4 and IPv6 loopback addresses, private ranges, internal hostnames, and redirect scenarios.
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 (12)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

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
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**Entry script:** `scripts/video_lips_change.js` (alongside this `SKILL.md`).

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill requires network access and reads a secret environment variable, but it does not declare an explicit tool scope such as permissions or allowed-tools. That omission weakens least-privilege controls and makes it harder for a host agent to constrain execution, especially since the skill itself contains runnable commands and external URL fetching behavior.

Content

No source excerpt is available for this finding.