Back to skill

Security audit

Elevenlabs Tts

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a normal ElevenLabs voice-message helper, but its documented WhatsApp workflow can pick and send the wrong temporary audio file.

Review the WhatsApp workflow before installing. Prefer a version that uses the exact output path from the current tts call or a private per-run directory, and do not let it send audio found by scanning shared /tmp locations. Treat text sent to ElevenLabs and WhatsApp recipients as external disclosure.

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:192
Finding

Unsafe Cross-Session Temporary Audio File Discovery

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 192-195
Vulnerability Type: Unsafe temporary-file handling and file substitution
Risk Level: Medium

Vulnerable Code

markdown
**2. Find the LATEST file (⚠️ CRITICAL - always use the newest file!):**
```bash
find /tmp/openclaw/tts-* /tmp/tts-* -name "*.opus" -o -name "*.mp3" -o -name "*.ogg" 2>/dev/null | xargs ls -t | head -1
text

### Technical Analysis

The documented workflow locates generated audio by scanning broad, predictable paths under `/tmp` and selecting whichever matching file has the newest timestamp. It does not bind the selected file to the current `tts` invocation or verify its owner, permissions, canonical path, session directory, or provenance.

This creates a time-of-check/file-substitution weakness in environments where another user, process, or concurrent session can create files or directories matching `/tmp/openclaw/tts-*` or `/tmp/tts-*`. The legacy `/tmp/tts-*` search path further expands the trust boundary despite the document warning that old files may exist there.

The `find` expression also lacks parentheses around its alternative filename conditions. Because `find` operators have precedence rules, the intended path behavior is ambiguous and the error-redirection action is not consistently associated with every alternative. Passing results through non-null-delimited `xargs` additionally mishandles filenames containing whitespace, quotes, or newlines.

The selected path is subsequently copied into the workspace and sent through the `message` tool. Consequently, file discovery is security-sensitive rather than merely an audio-selection reliability issue.

### Attack Path

1. The attacker or a concurrent untrusted process gains the ability to create a matching temporary directory or file under `/tmp/openclaw/tts-*` or `/tmp/tts-*`.
2. The attacker places an `.opus`, `.mp3`, or `.ogg` file in that location and gives it a modification time newer than the leg
...[truncated 961 chars]
Remediation
View remediation

Remediation Suggestions

  1. Use the exact output path returned by the current tts invocation instead of searching global or cross-session temporary locations.
  2. Create a unique private directory for each operation using a secure facility such as mktemp -d, and set its permissions to 0700.
  3. Restrict all discovery, conversion, copying, and cleanup operations to that private directory.
  4. Before sending the file, validate that:
    • Its canonical path remains inside the expected session directory.
    • It is a regular file and not a symbolic link.
    • It is owned by the expected user.
    • It was created as part of the current operation.
    • Its extension and actual media format are expected.
  5. Do not include the legacy /tmp/tts-* path in discovery.
  6. If enumeration is unavoidable, group the find conditions and use null-delimited processing, for example:
bash
find "$PRIVATE_TTS_DIR" -type f \
  \( -name '*.opus' -o -name '*.mp3' -o -name '*.ogg' \) \
  -print0
  1. Pass the validated path directly to ffmpeg, cp, and the messaging operation without reparsing it through whitespace-delimited xargs.
  2. Correct the separate malformed copy example at SKILL.md:208 so that it uses a valid, explicitly quoted workspace path.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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).

Content

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

5. Cleanup:

bash
rm /root/.openclaw/workspace/voice-temp.ogg

WhatsApp requires a non-empty message body to send voice notes. Use a single space as the message.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This skill is built around sending user-supplied text and API credentials to the external ElevenLabs service, which is an external transmission boundary. In context this is expected functionality, but it still creates real privacy and data-handling risk because prompts, generated content, and account metadata may leave the local environment and be processed by a third party.

Content

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

md
**Finding more voices:**
- Browse: https://elevenlabs.io/voice-library
- v3-optimized collection: https://elevenlabs.io/app/voice-library/collections/aF6JALq9R6tXwCczjhKH
- API: `GET https://api.elevenlabs.io/v1/voices`

**Voice selection tips:**
- Use IVC (Instant Voice Clone) or premade voices - PVC not optimized for v3 yet

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The sample configuration sets "languageCode": "en" even though the skill advertises multilingual support. This can be read as prescribing a specific language by default without explaining that users may choose another language.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes an ElevenLabs text-to-speech integration, but these documented steps require using cp and rm via the exec tool to move audio into the workspace and remove it afterward. While related to sending WhatsApp voice messages, arbitrary shell-based file management is not itself an inherent TTS capability and broadens what the skill operationally enables.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The markdown instructs users to run rm /root/.openclaw/workspace/voice-temp.ogg, which deletes a file from the workspace. Although the step is part of the workflow, the document provides no explicit warning that it performs deletion or that the path should be verified before removal.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The manifest focuses on generating AI voices with ElevenLabs, but this section documents creating multi-segment podcasts and concatenating files with ffmpeg. That is an audio editing/post-processing capability, not strictly necessary for a text-to-speech integration, and it relies on broader command execution functionality.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The example presents the 'wrong' and 'right' usage entirely in Hebrew, which can imply a language-specific expectation in a general reference document. Because the file does not explain that the guidance is Hebrew-specific or offer language choice, this may conflict with language/locale neutrality expectations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.