Back to skill

Security audit

url2podcast

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently makes Chinese podcast audio from a webpage, but it sends generated text to ByteDance TTS and clears its own workspace before each run.

Install only if you are comfortable sending the generated podcast lines and Volc TTS credentials to ByteDance's TTS API. Run it in its intended skill workspace, because each run is instructed to clear prior files there. For sensitive or untrusted source pages, harden the TTS request construction with a JSON serializer before use.

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
SKILL.md:182
Finding

Unsafe JSON Construction Through Direct Variable Interpolation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 182-190
Vulnerability Type: Improper encoding of dynamic values in a JSON request
Risk Level: Medium

Vulnerable Code

bash
curl -sS "https://openspeech.bytedance.com/api/v1/tts" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer;${VOLC_TOKEN}" \
  -d "{
    \"app\": {\"appid\": \"${VOLC_APPID}\", \"token\": \"${VOLC_TOKEN}\", \"cluster\": \"volcano_tts\"},
    \"user\": {\"uid\": \"podcast-maker\"},
    \"audio\": {\"voice_type\": \"${VOICE_TYPE}\", \"encoding\": \"wav\", \"speed_ratio\": ${SPEED_RATIO}, \"emotion\": \"${EMOTION}\"},
    \"request\": {\"reqid\": \"${REQID}\", \"text\": \"${TEXT}\", \"text_type\": \"plain\", \"operation\": \"query\"}
  }" > "${OUT_JSON}"

Technical Analysis

The request body is assembled by directly interpolating credentials, generated content, and other dynamic values into a quoted JSON document. These values are not serialized or escaped by a JSON-aware implementation.

If ${TEXT} or another string value contains a quotation mark, backslash, newline, control character, or deliberately crafted JSON syntax, it can terminate the intended string value and alter adjacent properties or make the request invalid. ${SPEED_RATIO} is inserted as an unquoted JSON fragment, increasing the risk of structural manipulation if it is not strictly validated as a numeric value.

Ordinary shell parameter expansion does not recursively execute shell metacharacters contained in these variables. Therefore, the available evidence does not establish shell command injection. The confirmed issue is JSON injection and request-integrity failure against the declared ByteDance TTS endpoint.

Attack Path

  1. An attacker controls or influences the web page supplied as the podcast source.
  2. Crafted content from that page is incorporated into a generated podcast line.
  3. The line is assigned to ${TEXT} w ...[truncated 1061 chars]
Remediation
View remediation

Remediation Suggestions

  • Build the request with a JSON-aware serializer such as Python's json.dumps rather than shell string interpolation.
  • Pass dynamic values to the serializer through positional arguments or environment variables, and let the serializer escape all strings.
  • Enforce an allowlist for VOICE_TYPE and EMOTION.
  • Parse SPEED_RATIO as a number and reject values outside the documented 0.90-1.05 range.
  • Validate REQID against a restrictive identifier format.
  • Check the HTTP status and validate the response schema before decoding audio data.
  • Avoid including the token in the JSON body if the API supports authorization exclusively through the header; otherwise retain it only as required by the provider.
  • A hardened construction pattern is:
bash
python3 - "$OUT_JSON" <<'PY'
import json
import os
import sys

voice_types = {
    "zh_female_qingxinnvsheng_uranus_bigtts",
    "zh_male_taocheng_uranus_bigtts",
}
emotions = {"neutral", "happy", "sad", "serious", "excited"}

voice_type = os.environ["VOICE_TYPE"]
emotion = os.environ["EMOTION"]
speed_ratio = float(os.environ["SPEED_RATIO"])

if voice_type not in voice_types:
    raise SystemExit("Invalid voice type")
if emotion not in emotions:
    emotion = "neutral"
if not 0.90 &lt;= speed_ratio &lt;= 1.05:
    raise SystemExit("Invalid speed ratio")

payload = {
    "app": {
        "appid": os.environ["VOLC_APPID"],
        "token": os.environ["VOLC_TOKEN"],
        "cluster": "volcano_tts",
    },
    "user": {"uid": "podcast-maker"},
    "audio": {
        "voice_type": voice_type,
        "encoding": "wav",
        "speed_ratio": speed_ratio,
        "emotion": emotion,
    },
    "request": {
        "reqid": os.environ["REQID"],
        "text": os.environ["TEXT"],
        "text_type": "plain",
        "operation": "query",
    },
}

with open(sys.argv[1], "w", encoding="utf-8") as outpu
...[truncated 271 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description requires converting webpage content into a two-person Chinese podcast, and the file further fixes Chinese host and guest voice types. This imposes a specific language/locale behavior without offering user opt-in or documenting why the locale restriction is required.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends generated podcast text and authentication material to an external TTS provider, but does not include a user-facing privacy notice or consent step. This creates a real risk of exposing sensitive source content and operational secrets to a third party without informed approval.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly requires clearing the workspace directory before every run, but provides no confirmation step, scope guard, or user warning about destructive behavior. Even if intended to avoid stale artifacts, this can cause unintended data loss if the workspace contains prior outputs or if path handling is implemented incorrectly.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

The skill contains a concrete curl template that transmits user-derived text to an external API endpoint for speech synthesis. In this skill's context, external transmission is expected functionality, but it remains security-relevant because webpage-derived content may contain sensitive data and the transfer happens automatically unless the user is warned and consents.

Content

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

单句请求模板(从 lines[i] 取值):

bash
curl -sS "https://openspeech.bytedance.com/api/v1/tts" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer;${VOLC_TOKEN}" \
  -d "{