Back to skill

Security audit

Elevenlabs Pro

Security checks for vulnerabilities and agentic risk

Overview

This ElevenLabs text-to-speech skill is mostly purpose-aligned, but it needs review because it encourages command-line API key use and under-warns about sending text to ElevenLabs.

Review before installing. Use an environment variable or secret manager instead of --api-key, do not send sensitive or regulated text unless you are comfortable with ElevenLabs processing it, and choose a unique output filename to avoid overwriting files.

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/elevenlabs.py:134
Finding
ElevenLabs API Key Exposed Through Command-Line Arguments## Vulnerability Details **File Location**: `scripts/elevenlabs.py:134-139` **Related Documentation**: `SKILL.md:17-20`, `SKILL.md:53` **Vulnerability Type**: Sensitive credential exposure through process arguments **Risk Level**: Medium ### Vulnerable Code ```python parser.add_argument("--api-key", help="ElevenLabs API key (overrides env var)") args = parser.parse_args() try: api_key = args.api_key or get_api_key() ``` The documentation explicitly promotes this credential-handling method: ```markdown Or pass it directly with `--api-key`. ``` ### Technical Analysis The Skill permits users to supply a plaintext ElevenLabs API key as a command-line argument. Command-line arguments can be exposed through shell history, process inspection utilities, endpoint-monitoring systems, diagnostic reports, audit logs, and process metadata collected by orchestration platforms. This exposure is unnecessary because the implementation already supports retrieving the key from the `ELEVENLABS_API_KEY` environment variable. Although the key must legitimately be sent to the fixed ElevenLabs HTTPS API endpoint in the `xi-api-key` header for the declared functionality, placing it in the process argument list expands its exposure beyond the minimum privileges and data flows required. No evidence was found that the Skill intentionally transmits the key to an unrelated service. Requests are directed to the fixed endpoint `https://api.elevenlabs.io/v1`; therefore, the vulnerability concerns local credential disclosure rather than malicious network exfiltration. ### Attack Path 1. A user follows the documented guidance and invokes the script with `--api-key sk_...`. 2. The plaintext API key becomes part of the process argument list and may also be saved in shell history or process-monitoring records. 3. A local user, monitoring agent, support-data collector, or other principal with access to that metadata retrieves the key. ...[truncated 937 chars]
Remediation
## Remediation Suggestions 1. Remove the `--api-key` command-line option and the `args.api_key` fallback so credentials cannot be supplied through process arguments. 2. Continue supporting `ELEVENLABS_API_KEY` for non-interactive execution, while ensuring deployment systems inject it through an approved secret manager rather than committed configuration files. 3. If interactive credential entry is required, use `getpass.getpass()` so the value is neither echoed nor included in the command line. 4. For file-based secret support, require a permission-restricted file, validate its ownership and permissions where practical, and read only the credential value. 5. Update `SKILL.md` to remove all recommendations and option-table entries that promote `--api-key`. 6. Advise users who previously supplied keys through command-line arguments to clear relevant shell history and logs and rotate potentially exposed keys. 7. Avoid including API keys in exception messages, debug output, telemetry, or request logging.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • 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 (6)

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill documents functionality that depends on environment-variable access and outbound network calls, but it declares no tool scope or permissions metadata. That mismatch can cause users or hosting systems to grant broader capabilities implicitly without clear disclosure, weakening least-privilege controls and reviewability.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill description explains text-to-speech usage but omits that provided text is transmitted to the external ElevenLabs service. This creates a privacy and data-handling risk because users may submit sensitive content without realizing it leaves the local environment.

YARA rule 'network_reconnaissance': Network reconnaissance and scanning patterns [hacktools]

Medium
Category
YARA Match
Content
FqnCBsd6RMkjVDRZzb | en | Warm, captivating storyteller |
| Brian | nPczCjzI2devNBz1zQrb | en | Deep, resonant, comforting |
| Daniel | onwK4e9ZLuTAKqWW03F9 | en | Steady broadcaster |
| Adam | pNInz6obpgDQGcFmaJgB | en | Dominant, firm |
| Eric | cjVigY5qzO86Huf0OWal | en | Smooth, trustworthy |
| Chris | iP95p4xoKVk53GoZ742B | en | Charming, down-to-earth |
| Harry | SOYHLrjzK2X1ezoPC6cr | en | Fierce warrior |
| Liam | TX3LPaxmHKxFdv7VOQHJ | en | Energetic, social media creator |
| Bill | pqHfZKP75CvOlQylNhV4 | en | Wise, mature, balanced |

### Neutral / Other

| Name | Voice ID | Language | Description |
|------|----------|----------|-------------|
| River | SAz9YHcvj6GT2YYXdXww | en | Relaxed, neutral, informative |

---

## Voice Settings Parameters

### stability (0.0 – 1.0)
Controls how consistent the voice sounds across generations.
- **Low (0.1–0.3):** More expressive and varied, but less predictable
- **Medium (0.4–0.6):** Balanced expressiveness and consistency ✅ D
Confidence
65% confidence
Finding
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

External Transmission

Medium
Category
Data Exfiltration
Content
import requests
from pathlib import Path

API_BASE = "https://api.elevenlabs.io/v1"

def get_api_key():
    key = os.environ.get("ELEVENLABS_API_KEY")
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
headers = get_headers(api_key)
    headers["Accept"] = "audio/mpeg"

    r = requests.post(url, headers=headers, json=payload, stream=True)
    r.raise_for_status()

    output = Path(output_path)
Confidence
80% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Low
Confidence
93% confidence
Finding
The documentation shows generating an MP3 to a local path but does not clearly warn that the command will create or overwrite a file. This can lead to accidental data loss or unexpected filesystem modification, especially if the output path is user-supplied or reused.

Static analysis

No suspicious patterns detected.