Back to skill

Security audit

Elevenlabs Tts

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward ElevenLabs text-to-speech helper that uses the expected ElevenLabs API key and network calls for voice listing and audio generation.

Install only if you intend to use ElevenLabs cloud TTS. Provide an ElevenLabs API key through the environment, do not put secrets in prompts or files, and avoid converting confidential, regulated, or proprietary text unless you are comfortable sending it to ElevenLabs. Choose an explicit output path because the script writes the generated audio there.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • 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)

Tainted flow: 'req' from os.environ.get (line 6, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
print('Missing ELEVENLABS_API_KEY', file=sys.stderr); sys.exit(2)
req=urllib.request.Request('https://api.elevenlabs.io/v1/voices',headers={'xi-api-key':KEY,'User-Agent':'openclaw-elevenlabs-skill/1'})
try:
    with urllib.request.urlopen(req,timeout=30) as r:
        data=json.loads(r.read().decode('utf-8'))
except urllib.error.HTTPError as e:
    print(f'HTTP {e.code}: '+e.read().decode('utf-8','ignore')[:1000], file=sys.stderr); sys.exit(1)
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Tainted flow: 'req' from os.environ.get (line 11, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
def request_json(path, key):
    req=urllib.request.Request(API+path,headers={'xi-api-key':key,'User-Agent':'openclaw-elevenlabs-skill/1'})
    with urllib.request.urlopen(req,timeout=30) as r:
        return json.loads(r.read().decode('utf-8'))

def resolve_voice_id(key, voice_id, voice_name):
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Tainted flow: 'req' from os.environ.get (line 11, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
out=Path(args.out).expanduser(); out.parent.mkdir(parents=True,exist_ok=True)
start=time.perf_counter(); first=None; chunks=0; total=0
try:
    with urllib.request.urlopen(req,timeout=120) as r, out.open('wb') as f:
        status=getattr(r,'status',None)
        while True:
            chunk=r.read(8192)
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill instructs use of environment variables and live network access to the ElevenLabs API, but the manifest declares no explicit tool scope such as permissions or allowed-tools. That creates a policy gap where an agent may invoke env/network capabilities without clear least-privilege boundaries or user visibility, increasing the chance of unintended secret access or outbound requests.

External Transmission

Medium
Category
Data Exfiltration
Content
import argparse, json, os, sys, time, urllib.parse, urllib.request, urllib.error
from pathlib import Path

API='https://api.elevenlabs.io/v1'

def die(msg, code=1):
    print(msg, file=sys.stderr); sys.exit(code)
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
import argparse, json, os, sys, time, urllib.parse, urllib.request, urllib.error
from pathlib import Path

API='https://api.elevenlabs.io/v1'

def die(msg, code=1):
    print(msg, file=sys.stderr); sys.exit(code)
Confidence
60% 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

Medium
Confidence
92% confidence
Finding
The script transmits arbitrary user-provided text to a third-party TTS provider without any explicit in-script notice or consent checkpoint. This can create a privacy and data-handling risk if callers pass sensitive, proprietary, or regulated content assuming processing is local.

Missing User Warnings

Low
Confidence
81% confidence
Finding
The script creates parent directories and writes streamed audio bytes to the path given by --out. While file output is part of the tool's function, there is no explicit warning, comment, or user-facing notice that it will create directories and overwrite or create a local file at the specified path.

Static analysis

No suspicious patterns detected.