Back to skill

Security audit

Elevenlabs Integration with Openclaw

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent ElevenLabs voice tool, but it exposes sensitive API credentials in documented debug output and sends voice/audio data to a third-party service without strong privacy or consent warnings.

Review before installing in environments that handle private audio, regulated data, customer recordings, or production API keys. Avoid DEBUG=1 with real ElevenLabs credentials until debug logging is redacted, do not run the scripts or tests from shared writable directories, and only upload or clone voices when you have consent and are comfortable sending the media to ElevenLabs.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/transcribe.sh:116
Finding
ElevenLabs API Key Disclosed in Debug Output<![CDATA[ ## Vulnerability Details **File Location**: `scripts/transcribe.sh:116-128` **Vulnerability Type**: Sensitive credential exposure through diagnostic logging **Risk Level**: High ### Vulnerable Code ```bash # Build curl command CURL_CMD=(curl -s -X POST "https://api.elevenlabs.io/v1/speech-to-text" \ -H "xi-api-key: $API_KEY") # Build form data FORM_DATA=(-F "model_id=$MODEL") FORM_DATA+=(-F "file=@$AUDIO_FILE") [[ -n "$LANGUAGE" ]] && FORM_DATA+=(-F "language_code=$LANGUAGE") [[ -n "$TIMESTAMPS" ]] && FORM_DATA+=(-F "timestamps_granularity=$TIMESTAMPS") FORM_DATA+=(-F "tag_audio_events=$TAG_AUDIO_EVENTS") # Debug if [[ -n "${DEBUG:-}" ]]; then log_info "curl ${CURL_CMD[*]} ${FORM_DATA[*]}" fi ``` ### Technical Analysis The `CURL_CMD` array contains the complete `xi-api-key` authentication header. When the `DEBUG` environment variable is non-empty, `${CURL_CMD[*]}` expands every array element and writes the plaintext API key to standard output. This debug mode is explicitly documented in `SKILL.md:307-312`, so users may reasonably enable it while troubleshooting. The exposed value can consequently enter terminal logs, OpenClaw execution transcripts, CI logs, monitoring systems, support tickets, or shared diagnostic output. The authenticated network request itself is necessary for the declared transcription functionality and targets the expected ElevenLabs API. The vulnerability is the unnecessary disclosure of the credential in diagnostic output. ### Attack Path 1. A user configures a valid `ELEVENLABS_API_KEY`. 2. The user follows the documented troubleshooting instructions and invokes `transcribe.sh` with `DEBUG=1`. 3. The script expands `CURL_CMD`, including `-H "xi-api-key: <secret>"`, and prints it. 4. The output is retained in an agent transcript, CI log, terminal capture, or support bundle. 5. An attacker who can read that output extracts the API key. 6. The attacker submits authenticated requests to ElevenLabs using the stolen ...[truncated 499 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Never expand or log command arrays containing authentication headers. 2. Replace the current debug message with a manually constructed, redacted representation: ```bash if [[ -n "${DEBUG:-}" ]]; then log_info "curl -s -X POST https://api.elevenlabs.io/v1/speech-to-text \ -H 'xi-api-key: [REDACTED]' ${FORM_DATA[*]}" fi ``` 3. Prefer logging only non-sensitive metadata, such as the endpoint, model, input basename, and whether optional fields are enabled. 4. Review all diagnostic output to ensure no secret environment variables, bearer tokens, cookies, or authentication headers are printed. 5. Add a regression test that runs the script with a synthetic API key and `DEBUG=1`, then fails if the key appears in captured output. 6. Update `SKILL.md` to state that debug output is sanitized and must not be used to expose request credentials. 7. Rotate any API key that may already have appeared in retained debug logs. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/speak.sh:191
Finding
Predictable Temporary Output Files Permit Symlink-Based File Clobbering<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/speak.sh:191-206` - `scripts/sfx.sh:118-133` - `scripts/isolate.sh:101-115` - `scripts/dub.sh:265-278` **Vulnerability Type**: Insecure predictable temporary-file creation and symlink following **Risk Level**: Medium ### Vulnerable Code `scripts/speak.sh:191-206`: ```bash TEMP_OUTPUT="${OUTPUT}.tmp.$$" HTTP_CODE=$(curl -s -w "%{http_code}" -o "$TEMP_OUTPUT" \ -X POST "https://api.elevenlabs.io/v1/text-to-speech/$VOICE_ID" \ -H "xi-api-key: $API_KEY" \ -H "Content-Type: application/json" \ -d "$REQUEST" 2>&1) || { log_error "Failed to connect to ElevenLabs API" rm -f "$TEMP_OUTPUT" exit 1 } END_TIME=$(date +%s) DURATION=$((END_TIME - START_TIME)) if handle_api_error "$TEMP_OUTPUT" "$HTTP_CODE"; then mv "$TEMP_OUTPUT" "$OUTPUT" ``` `scripts/sfx.sh:118-133`: ```bash TEMP_OUTPUT="${OUTPUT}.tmp.$$" HTTP_CODE=$(curl -s -w "%{http_code}" -o "$TEMP_OUTPUT" \ -X POST "https://api.elevenlabs.io/v1/sound-generation" \ -H "xi-api-key: $API_KEY" \ -H "Content-Type: application/json" \ -d "$REQUEST" 2>&1) || { log_error "Failed to connect to ElevenLabs API" rm -f "$TEMP_OUTPUT" exit 1 } END_TIME=$(date +%s) DURATION_TIME=$((END_TIME - START_TIME)) if handle_api_error "$TEMP_OUTPUT" "$HTTP_CODE"; then mv "$TEMP_OUTPUT" "$OUTPUT" ``` `scripts/isolate.sh:101-115`: ```bash TEMP_OUTPUT="${OUTPUT}.tmp.$$" HTTP_CODE=$(curl -s -w "%{http_code}" -o "$TEMP_OUTPUT" \ -X POST "https://api.elevenlabs.io/v1/audio-isolation" \ -H "xi-api-key: $API_KEY" \ "${FORM_DATA[@]}" 2>&1) || { log_error "Failed to connect to ElevenLabs API" rm -f "$TEMP_OUTPUT" exit 1 } END_TIME=$(date +%s) DURATION=$((END_TIME - START_TIME)) if handle_api_error "$TEMP_OUTPUT" "$HTTP_CODE"; then mv "$TEMP_OUTPUT" "$OUTPUT" ``` `scripts/dub.sh:265-278`: ```bash TEMP_OUTPUT="${OUTPUT}.tmp.$$" HTTP_CODE=$(curl -s -w "%{http_code}" -o "$TEMP_OUTPUT" \ ...[truncated 2318 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace PID-derived names with securely and atomically created temporary files: ```bash OUTPUT_PARENT=$(dirname "$OUTPUT") mkdir -p "$OUTPUT_PARENT" TEMP_OUTPUT=$(mktemp "$OUTPUT_PARENT/.clawvox-output.XXXXXX") chmod 600 "$TEMP_OUTPUT" cleanup() { rm -f -- "$TEMP_OUTPUT" } trap cleanup EXIT ``` 2. Keep the temporary file in the destination directory so the final rename remains atomic and does not cross filesystems. 3. Set `umask 077` before creating temporary files. 4. Pass `--` to file-management commands where supported: ```bash mv -- "$TEMP_OUTPUT" "$OUTPUT" rm -f -- "$TEMP_OUTPUT" ``` 5. Validate that the destination directory is not unexpectedly world-writable. Refuse unsafe directories when the Skill operates with elevated privileges. 6. Retain the temporary file descriptor or otherwise ensure the file used by `curl` is the same securely created file. 7. Apply the same secure helper consistently in `speak.sh`, `sfx.sh`, `isolate.sh`, and `dub.sh`. 8. Add tests that pre-create symlinks near the destination path and verify that unrelated files cannot be modified. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
test.sh:57
Finding
Test Suite Uses Shared Predictable Files Under /tmp<![CDATA[ ## Vulnerability Details **File Locations**: - `test.sh:57` - `test.sh:89-90` - `test.sh:150-162` - `test.sh:180-203` - `test.sh:208-218` - `test.sh:236-252` **Vulnerability Type**: Unsafe shared temporary-file handling **Risk Level**: Medium ### Vulnerable Code ```bash if eval "$test_cmd" > /tmp/test_output.txt 2>&1; then ``` ```bash if eval "$test_cmd" > /tmp/test_output.txt 2>&1; then if grep -q "$expected" /tmp/test_output.txt; then ``` ```bash OUTPUT_FILE="/tmp/test_tts_$$.mp3" if $SCRIPTS_DIR/speak.sh --out "$OUTPUT_FILE" "Hello from ElevenLabs Voice Studio test suite" 2>/tmp/test_output.txt; then if [[ -f "$OUTPUT_FILE" && -s "$OUTPUT_FILE" ]]; then echo -e "${GREEN}PASSED${NC}" ((TESTS_PASSED++)) FILE_SIZE=$(stat -f%z "$OUTPUT_FILE" 2>/dev/null || stat -c%s "$OUTPUT_FILE" 2>/dev/null || echo "0") echo " Generated: $(( FILE_SIZE / 1024 )) KB" cp "$OUTPUT_FILE" /tmp/test_tts_sample.mp3 rm -f "$OUTPUT_FILE" ``` ```bash if [[ -f /tmp/test_tts_sample.mp3 ]]; then echo -n "Testing: Transcribe (API)... " if $SCRIPTS_DIR/transcribe.sh /tmp/test_tts_sample.mp3 > /tmp/transcript.txt 2>/tmp/test_output.txt; then TRANSCRIPT=$(cat /tmp/transcript.txt) if [[ -n "$TRANSCRIPT" ]]; then echo -e "${GREEN}PASSED${NC}" ((TESTS_PASSED++)) echo " Transcript: ${TRANSCRIPT:0:50}..." else echo -e "${RED}FAILED${NC} (empty transcript)" ((TESTS_FAILED++)) fi else ERROR=$(cat /tmp/test_output.txt) if echo "$ERROR" | grep -qi "quota\|rate\|limit"; then echo -e "${YELLOW}SKIPPED${NC} (quota/rate limit)" ((TESTS_SKIPPED++)) else echo -e "${RED}FAILED${NC}" echo " Error: $ERROR" ((TESTS_FAILED++)) fi fi rm -f /tmp/test_tts_sample.mp3 /tmp/transcript.txt fi ``` ```bash OUTPUT_FILE="/tmp/test_sfx_$$.mp3" if $SCR ...[truncated 2577 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create a private temporary directory at startup: ```bash umask 077 TEST_TMPDIR=$(mktemp -d) cleanup() { rm -rf -- "$TEST_TMPDIR" } trap cleanup EXIT ``` 2. Store all temporary output exclusively inside that directory: ```bash TEST_OUTPUT="$TEST_TMPDIR/test_output.txt" TTS_OUTPUT="$TEST_TMPDIR/test_tts.mp3" TTS_SAMPLE="$TEST_TMPDIR/test_tts_sample.mp3" TRANSCRIPT="$TEST_TMPDIR/transcript.txt" SFX_OUTPUT="$TEST_TMPDIR/test_sfx.mp3" ``` 3. Replace every fixed `/tmp/...` reference with the corresponding private path. 4. Avoid PID-based names as a security mechanism; `mktemp` provides atomic creation with unpredictable names. 5. Replace `eval` with array-based invocation, even though the currently supplied commands are internal constants. This prevents future command injection if test commands later incorporate user input: ```bash run_test_contains() { local test_name="$1" local expected="$2" shift 2 if "$@" >"$TEST_OUTPUT" 2>&1; then grep -q -- "$expected" "$TEST_OUTPUT" fi } ``` 6. Use `--` with `cp`, `rm`, and `grep` where applicable. 7. Add multi-user and symlink-resistance tests to verify that files outside `TEST_TMPDIR` cannot be modified. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (29)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
((TESTS_FAILED++))
        fi
    fi
    rm -f /tmp/test_tts_sample.mp3 /tmp/transcript.txt
fi

# Test 13: Generate sound effect (if not rate limited)
Confidence
95% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README encourages speech transcription, voice cloning, isolation, and dubbing workflows that require uploading user audio or video to ElevenLabs, but it does not clearly warn that potentially sensitive media and derived biometric voice data are transmitted to a third-party service. Users may unknowingly submit private conversations, regulated data, or someone else's voice, creating privacy, consent, and compliance risks.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill clearly instructs the agent to invoke shell scripts and external commands, but it does not declare any explicit tool scope such as permissions or allowed-tools. That increases the risk of overbroad execution because the hosting platform cannot constrain what command execution capabilities this skill expects or requires.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The transcription, isolation, and dubbing features instruct users to upload audio to a third-party API but do not warn that recordings may contain personal, confidential, or regulated information. This omission can lead users to send sensitive meeting audio, customer data, or private conversations off-device without informed consent or review.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The voice cloning section enables replication of a person's voice without any warning about consent, authorization, impersonation, or biometric privacy concerns. In context, this can facilitate non-consensual cloning, social engineering, fraud, or misuse of sensitive voice data.

External Transmission

Medium
Category
Data Exfiltration
Content
## API Usage Examples

For direct API access, all scripts use curl under the hood:

```bash
# Direct TTS API call
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
96% confidence
Finding
The script uploads user-provided audio samples to ElevenLabs for voice cloning, but it does not provide an explicit privacy or third-party data-transfer warning at the point of use. Because voice recordings are biometric and potentially highly sensitive, users may unknowingly transmit personal or third-party data to an external service, creating privacy, consent, and compliance risk.

External Transmission

Medium
Category
Data Exfiltration
Content
START_TIME=$(date +%s)

RESPONSE=$(curl -s -X POST "https://api.elevenlabs.io/v1/voices/add" \
    -H "xi-api-key: $API_KEY" \
    "${FORM_DATA[@]}" 2>&1) || {
    log_error "Failed to connect to ElevenLabs API"
Confidence
93% confidence
Finding
The script performs an actual POST request to ElevenLabs and uploads local audio files for voice cloning. In the context of voice samples, this is more sensitive than ordinary network use because the transferred data may include biometric identifiers, copyrighted speech, or recordings of third parties, and the script does not gate the transfer with explicit consent or a privacy warning.

External Transmission

Medium
Category
Data Exfiltration
Content
START_TIME=$(date +%s)

TEMP_OUTPUT="${OUTPUT}.tmp.$$"
HTTP_CODE=$(curl -s -w "%{http_code}" -o "$TEMP_OUTPUT" \
    -X POST "https://api.elevenlabs.io/v1/sound-generation" \
    -H "xi-api-key: $API_KEY" \
    -H "Content-Type: application/json" \
Confidence
93% confidence
Finding
This curl invocation sends request data and an API credential to an external service, which is expected for the feature but still constitutes external data transmission. In a security review of agent skills, this is dangerous because user input may contain sensitive information and the transmission occurs automatically without contextual consent or minimization.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script transmits the user-provided sound-effect description to ElevenLabs over the network, but it does not clearly warn the user at execution time that their prompt content will leave the local environment. In an agent/skill context, users may enter sensitive or proprietary text assuming local processing, so silent exfiltration of prompt contents to a third-party API is a real privacy and data-handling risk.

External Transmission

Medium
Category
Data Exfiltration
Content
TEMP_OUTPUT="${OUTPUT}.tmp.$$"
HTTP_CODE=$(curl -s -w "%{http_code}" -o "$TEMP_OUTPUT" \
    -X POST "https://api.elevenlabs.io/v1/sound-generation" \
    -H "xi-api-key: $API_KEY" \
    -H "Content-Type: application/json" \
    -d "$REQUEST" 2>&1) || {
Confidence
90% confidence
Finding
The hardcoded ElevenLabs endpoint confirms this skill is designed to send content off-host to a third-party SaaS provider. While not inherently malicious, in this skill context it increases exposure because descriptions may contain confidential information and the user is not forced through any explicit privacy acknowledgment before transmission.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The script transmits user-provided text and the API key to ElevenLabs over the network, but it does not provide an explicit privacy warning or confirmation before sending potentially sensitive content. In a voice/TTS skill this behavior is expected, yet it is still a real privacy/security concern because users may unintentionally submit secrets, personal data, or proprietary text to a third-party service.

External Transmission

Medium
Category
Data Exfiltration
Content
START_TIME=$(date +%s)

TEMP_OUTPUT="${OUTPUT}.tmp.$$"
HTTP_CODE=$(curl -s -w "%{http_code}" -o "$TEMP_OUTPUT" \
    -X POST "https://api.elevenlabs.io/v1/text-to-speech/$VOICE_ID" \
    -H "xi-api-key: $API_KEY" \
    -H "Content-Type: application/json" \
Confidence
95% confidence
Finding
This curl call sends the constructed request body, which includes the user's text, to an external ElevenLabs API endpoint. Although this is core to the skill's purpose, it creates a genuine external data exposure path: any sensitive text supplied by the user leaves the local environment and is subject to third-party handling and retention policies.

External Transmission

Medium
Category
Data Exfiltration
Content
TEMP_OUTPUT="${OUTPUT}.tmp.$$"
HTTP_CODE=$(curl -s -w "%{http_code}" -o "$TEMP_OUTPUT" \
    -X POST "https://api.elevenlabs.io/v1/text-to-speech/$VOICE_ID" \
    -H "xi-api-key: $API_KEY" \
    -H "Content-Type: application/json" \
    -d "$REQUEST" 2>&1) || {
Confidence
88% confidence
Finding
The hardcoded ElevenLabs API endpoint confirms that this skill depends on sending data to an external service. In context, this is expected functionality rather than covert exfiltration, but it still represents a real privacy boundary crossing because user content is transmitted off-host.

External Transmission

Medium
Category
Data Exfiltration
Content
log_info "Model: $MODEL"

# Build curl command
CURL_CMD=(curl -s -X POST "https://api.elevenlabs.io/v1/speech-to-text" \
    -H "xi-api-key: $API_KEY")

# Build form data
Confidence
90% confidence
Finding
This script sends user-supplied audio data to a third-party endpoint at api.elevenlabs.io. In the context of a voice/transcription skill this is expected functionality, but it still creates a genuine data-exfiltration/privacy boundary because potentially sensitive recordings leave the local environment and there is no in-script consent, scoping, or warning mechanism.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The script uploads the provided audio file to ElevenLabs' external speech-to-text API, but it does not provide an explicit privacy or data-disclosure warning at the point of use. This can cause users to unknowingly transmit sensitive or regulated audio content off-host, which is a real privacy/security issue even if the behavior is consistent with the skill's transcription purpose.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Options for 'delete':
  -i, --id <id>     Voice ID (required)
  --force           Skip confirmation

Options for 'preview':
  -i, --id <id>     Voice ID
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

External Transmission

Medium
Category
Data Exfiltration
Content
log_info "Fetching voices..."
        
        RESPONSE=$(curl -s "https://api.elevenlabs.io/v1/voices" \
            -H "xi-api-key: $API_KEY") || {
            log_error "Failed to connect to ElevenLabs API"
            exit 1
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
log_info "Fetching voices..."
        
        RESPONSE=$(curl -s "https://api.elevenlabs.io/v1/voices" \
            -H "xi-api-key: $API_KEY") || {
            log_error "Failed to connect to ElevenLabs API"
            exit 1
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
log_info "Fetching voices..."
        
        RESPONSE=$(curl -s "https://api.elevenlabs.io/v1/voices" \
            -H "xi-api-key: $API_KEY") || {
            log_error "Failed to connect to ElevenLabs API"
            exit 1
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
log_info "Fetching voices..."
        
        RESPONSE=$(curl -s "https://api.elevenlabs.io/v1/voices" \
            -H "xi-api-key: $API_KEY") || {
            log_error "Failed to connect to ElevenLabs API"
            exit 1
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
log_info "Fetching voices..."
        
        RESPONSE=$(curl -s "https://api.elevenlabs.io/v1/voices" \
            -H "xi-api-key: $API_KEY") || {
            log_error "Failed to connect to ElevenLabs API"
            exit 1
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
log_info "Fetching voices..."
        
        RESPONSE=$(curl -s "https://api.elevenlabs.io/v1/voices" \
            -H "xi-api-key: $API_KEY") || {
            log_error "Failed to connect to ElevenLabs API"
            exit 1
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
log_info "Fetching voices..."
        
        RESPONSE=$(curl -s "https://api.elevenlabs.io/v1/voices" \
            -H "xi-api-key: $API_KEY") || {
            log_error "Failed to connect to ElevenLabs API"
            exit 1
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
log_info "Fetching voices..."
        
        RESPONSE=$(curl -s "https://api.elevenlabs.io/v1/voices" \
            -H "xi-api-key: $API_KEY") || {
            log_error "Failed to connect to ElevenLabs API"
            exit 1
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.