Back to skill

Security audit

Minimax Tts

Security checks for vulnerabilities and agentic risk

Overview

This MiniMax text-to-speech skill is mostly purpose-aligned, but it exposes a user-configurable API URL that can send the MiniMax API key and submitted text to an arbitrary endpoint.

Review this skill before installing. Use it only if you are comfortable sending text to MiniMax for synthesis, and do not pass --api_url unless it is a trusted MiniMax endpoint; otherwise your API key and submitted text could be sent to the wrong server. Prefer removing or restricting the endpoint override before routine 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

Error
Location
scripts/tts.py:47
Finding

Unrestricted API Endpoint Allows Disclosure of Credentials and User Text

Content
View full analysis

Vulnerability Details

File Location: scripts/tts.py, lines 47-106
Vulnerability Type: User-controlled credential transmission endpoint
Risk Level: High

The script permits callers to override the MiniMax API endpoint without validating its scheme, hostname, port, or path. It then sends the MiniMax bearer token and user-provided synthesis text directly to that endpoint.

python
p.add_argument("--api_url", default=DEFAULT_API_URL, help=f"API URL (default: {DEFAULT_API_URL})")
python
def synthesize(args):
    api_key = get_api_key(args.api_key)
    payload = build_payload(args)

    headers = {
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    }

    print(f"[MiniMax TTS] Model: {args.model} | Voice: {args.voice_id} | Format: {args.audio_format} | Sample Rate: {args.sample_rate}")
    print(f"[MiniMax TTS] Text ({len(args.text)} chars): {args.text[:80]}{'...' if len(args.text) > 80 else ''}")

    resp = requests.post(args.api_url, headers=headers, json=payload, timeout=60)

The unsafe override is also explicitly documented in skill.md, line 92:

text
--api_url URL           Override API URL

Technical Analysis

args.api_url is entirely caller-controlled. No allowlist limits requests to the documented MiniMax endpoints, and no validation requires HTTPS. The value is passed directly to requests.post() while the request contains:

  • The MiniMax API key in the Authorization: Bearer header.
  • The complete user-supplied text in the JSON payload.
  • Other synthesis configuration and metadata.

Consequently, a malicious or mistakenly supplied endpoint can collect both the credential and potentially sensitive input text. Non-HTTPS URLs can additionally expose this information to network interception. Internal or loopback destinations could also cause the execution environment to make authenticated outbound requests to unint ...[truncated 1422 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove --api_url if endpoint customization is not essential.
  2. If both documented endpoints must be supported, accept an endpoint identifier rather than an arbitrary URL and map it internally to:
    • https://api.minimax.io/v1/t2a_v2
    • https://api-uw.minimax.io/v1/t2a_v2
  3. If URL input must remain available, parse and normalize it before use and enforce all of the following:
    • The scheme must be https.
    • The hostname must exactly match an approved MiniMax hostname.
    • User information, fragments, unexpected ports, and alternate paths must be rejected.
    • Hostname suffix matching must not be used because domains such as api.minimax.io.attacker.example could bypass an unsafe suffix check.
  4. Disable redirects for authenticated requests with allow_redirects=False, or validate every redirect destination before resending any sensitive header.
  5. Never attach the MiniMax authorization header when the destination fails validation.
  6. Add automated tests covering HTTP URLs, loopback and private addresses, deceptive hostnames, URL user-information syntax, alternate ports, and redirects to untrusted hosts.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/voices.md (reported line 212)May include surrounding context.

md
import requests
import json

DEFAULT_API_URL = "https://api.minimax.io/v1/t2a_v2"
MODEL_DEFAULTS = {
    "model": "speech-2.8-hd",
    "voice_id": "English_expressive_narrator",

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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/tts.py (reported line 15)May include surrounding context.

python
import requests
import json

DEFAULT_API_URL = "https://api.minimax.io/v1/t2a_v2"
MODEL_DEFAULTS = {
    "model": "speech-2.8-hd",
    "voice_id": "English_expressive_narrator",

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · skill.md (reported line 13)May include surrounding context.

md
import requests
import json

DEFAULT_API_URL = "https://api.minimax.io/v1/t2a_v2"
MODEL_DEFAULTS = {
    "model": "speech-2.8-hd",
    "voice_id": "English_expressive_narrator",

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/tts.py (reported line 104)May include surrounding context.

python
print(f"[MiniMax TTS] Model: {args.model} | Voice: {args.voice_id} | Format: {args.audio_format} | Sample Rate: {args.sample_rate}")
    print(f"[MiniMax TTS] Text ({len(args.text)} chars): {args.text[:80]}{'...' if len(args.text) > 80 else ''}")

    resp = requests.post(args.api_url, headers=headers, json=payload, timeout=60)
    if resp.status_code != 200:
        raise RuntimeError(f"API error {resp.status_code}: {resp.text}")

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill metadata includes broad natural-language triggers such as 'read this aloud' and 'generate voice' that could match routine user requests and activate the skill unintentionally. In an agent ecosystem, overbroad activation can cause unexpected external API usage, unintended transmission of user-provided text to a third party, and surprise billing or privacy issues.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The manifest describes text-to-speech generation via MiniMax's HTTP API, but does not mention accessing local environment state for credentials. While common for API clients, reading environment variables is still an additional capability beyond pure text-to-audio conversion and is not explicitly justified in the stated purpose.

Content

No source excerpt is available for this finding.