Back to skill

Security audit

DubbingHub

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently translates user-provided videos through a disclosed external service, with some privacy and request-hardening caveats but no evidence of hidden, deceptive, persistent, or destructive behavior.

Install this only if you are comfortable sending the selected video file or video URL to audiox-api-global.luoji.cn using your VIDEO_TRANSLATE_SERVICE_API_KEY. Avoid using it for confidential media unless you trust that service's privacy and retention practices, and treat the bundled curl helper as an example that should be hardened before accepting untrusted 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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/curl_examples.sh:45
Finding

Unescaped User-Controlled Video URL Allows JSON Request-Body Injection

Content
View full analysis

Vulnerability Details

File Location: scripts/curl_examples.sh, lines 45-55
Vulnerability Type: JSON injection caused by unsafe string interpolation
Risk Level: Medium

Vulnerable Code

bash
if [[ "${VIDEO_SOURCE}" =~ ^https?:// ]]; then
  SUBMIT_RESP="$(curl -sS -X POST "${BASE_URL}/video-trans/orchestrate" \
    -H "Authorization: Bearer ${API_KEY}" \
    -H 'Content-Type: application/json' \
    --data-binary @- <<JSON
{
  "video_url": "${VIDEO_SOURCE}",
  "target_language": "${TARGET_LANGUAGE}"
}
JSON
)"

VIDEO_SOURCE originates from the script's first command-line argument:

bash
VIDEO_SOURCE="$1"

Technical Analysis

The script constructs a JSON document by directly interpolating the user-controlled VIDEO_SOURCE value into a heredoc. Shell variable expansion does not perform JSON encoding. Characters such as double quotes, backslashes, control characters, and newlines can therefore terminate the original JSON string or introduce additional JSON properties.

For example, a source argument with an injected fragment could cause the generated body to resemble:

json
{
  "video_url": "https://example.com/video.mp4",
  "injected_property": "attacker-controlled",
  "target_language": "en"
}

The precise effect depends on the remote API's JSON parser, duplicate-property handling, and support for additional fields. Even when injected properties are rejected, a crafted value can reliably produce malformed JSON and disrupt job submission.

This is not shell command injection because the value is expanded as heredoc content rather than evaluated as shell syntax. The confirmed weakness is manipulation of the outbound JSON request body.

Attack Path

  1. An attacker influences or supplies the video URL passed as the first argument to curl_examples.sh.
  2. The supplied value begins with http:// or https://, satisfying the URL branch condi ...[truncated 1271 chars]
Remediation
View remediation

Remediation Suggestions

Construct the request with a real JSON serializer rather than interpolating values into JSON text. For example:

bash
REQUEST_BODY="$(
  python3 -c '
import json
import sys

print(json.dumps({
    "video_url": sys.argv[1],
    "target_language": sys.argv[2],
}))
' "${VIDEO_SOURCE}" "${TARGET_LANGUAGE}"
)"

SUBMIT_RESP="$(
  curl -sS -X POST "${BASE_URL}/video-trans/orchestrate" \
    -H "Authorization: Bearer ${API_KEY}" \
    -H "Content-Type: application/json" \
    --data-binary "${REQUEST_BODY}"
)"

Additional hardening should include:

  1. Parse the supplied URL with a URL-aware library and require the scheme to be exactly http or https.
  2. Reject control characters in command-line URL input before submission.
  3. Validate that the serialized body can be parsed as JSON before sending it.
  4. Enforce a reasonable maximum URL length.
  5. Ensure the remote service rejects unknown properties and validates every accepted field against a strict schema.
  6. Add regression tests using URLs containing quotes, backslashes, Unicode characters, and newlines to verify that they remain a single encoded JSON string.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares shell/runtime capabilities (curl, python3) but does not restrict tool scope with explicit permissions or allowed-tools. In an agent environment, this increases the chance of unintended command execution or capability creep beyond the minimum needed for the documented workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill processes user-supplied videos or video URLs by sending them to an external third-party service, but the user-facing description and invocation guidance do not clearly warn about that data transfer. This can cause users to disclose sensitive media or internal URLs without informed consent, creating privacy and confidentiality risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Defaulting to English when the user does not specify a target language can cause the skill to perform an irreversible or costly external processing action that the user did not intend. In this context, it is mainly a consent and correctness issue rather than direct code execution, but it can still waste tokens, processing time, and expose content unnecessarily to a third party.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
72% confidence
Finding

The manifest mixes a Chinese short description with an English default prompt that hard-codes supported target languages and defaults to English. This can be interpreted as imposing a language/locale behavior without explicitly offering user opt-in or clarifying that the default is adjustable by user preference.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill enables implicit invocation without any narrowing conditions, so an agent may auto-select this capability whenever a user mentions videos, translation, or dubbing. Because this skill sends user-provided files or URLs to an external third-party service, unintended invocation can cause unplanned data egress and privacy exposure, especially for sensitive or copyrighted video content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The contract states that if the user omits a target language, the skill will default to en. This imposes a specific language choice without explicit user opt-in, which matches the locale/language policy violation criteria.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/curl_examples.sh (reported line 46)May include surrounding context.

sh
echo "[2/4] Submit job"
if [[ "${VIDEO_SOURCE}" =~ ^https?:// ]]; then
  SUBMIT_RESP="$(curl -sS -X POST "${BASE_URL}/video-trans/orchestrate" \
    -H "Authorization: Bearer ${API_KEY}" \
    -H 'Content-Type: application/json' \
    --data-binary @- <<JSON

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file performs network transmission of user-provided content to a third-party service using curl, including direct file upload via multipart form data and remote URL submission. Although the script prints progress messages, it does not clearly disclose that local media or supplied URLs will be transmitted off-system to an external service.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.