Back to skill

Security audit

Telegram Voice Messaging Recovery

Security checks for vulnerabilities and agentic risk

Overview

The skill is a plausible voice-messaging recovery helper, but it has serious unsafe execution and under-disclosed remote TTS/data-retention behavior that users should review before installing.

Install only if you are comfortable with network downloads, a hosted Edge/Microsoft TTS service receiving text for synthesis, local caching of generated audio, and scripts living under OpenClaw voice directories. Do not run this as root or against untrusted audio paths until the command-injection and unsafe-temp-file issues are fixed, dependencies are pinned, and the missing transcribe-audio artifact is resolved.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/voice_handler.py:32
Finding

Command and Python Code Injection Through an Attacker-Controlled Audio Path

Content
View full analysis
/dev/null" subprocess.run(cmd, shell=True, check=True) audio_file = wav_file # Transcribe with faster-whisper cmd = [ sys.executable, "-c", """ from faster_whisper import WhisperModel import sys model = WhisperModel('%s', device='cpu', compute_type='int8') segments, info = model.transcribe('%s', beam_size=5) text = ' '.join(segment.text for segment in segments) print(json.dumps({'text': text, 'language': info.language, 'probability': info.language_probability})) """ % (self.stt_model, audio_file) ] result = subprocess.run(cmd, capture_output=True, text=True) ``` ### Technical Analysis The `audio_file` value is embedded into two executable contexts without escaping: 1. For OGG files, it is interpolated into a shell command passed to `subprocess.run(..., shell=True)`. Single quotes in the path can terminate the intended shell argument and introduce shell operators and arbitrary commands. 2. The resulting path is interpolated into source code supplied to `python -c`. A single quote can terminate the Python string literal and append arbitrary Python statements. Using single quotes around the shell argument does not make the operation safe when the interpolated value itself can contain a single quote. Likewise, passing the generated Python program as an argument array only protects the outer process invocation; it does not prevent injection into the dynamically constructed source code. ### Attack Path 1. An attacker causes the voice-processing entry point to receive an audio path containing shell or Python metacharacters. This requires influence over the path pas ...[truncated 1264 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/install.sh:76
Finding

Unpinned Third-Party Packages Are Downloaded and Installed at Runtime

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/voice_handler.py:32
Finding

Unsafe Temporary File Creation in the Voice Handler

Content
View full analysis
/dev/null" subprocess.run(cmd, shell=True, check=True) audio_file = wav_file ``` ```python if output_file is None: output_file = tempfile.mktemp(suffix=".wav", prefix="tts_") cmd = [sys.executable, self.tts_script, text, output_file] result = subprocess.run(cmd, capture_output=True, text=True) ``` ### Technical Analysis `tempfile.mktemp()` returns an unused pathname but does not atomically create and reserve the file. A separate local process can create a file or symbolic link at that pathname before ffmpeg or the TTS wrapper opens it. This creates a time-of-check/time-of-use race. The later writer does not verify that the destination is still a newly created regular file owned by the current user. Temporary artifacts are also not removed reliably, potentially leaving transcriptions or generated speech in the shared temporary directory. ### Attack Path 1. A local attacker monitors the shared temporary directory for candidate `tmp*.wav` or `tts_*.wav` names, or repeatedly creates likely names. 2. After `mktemp()` selects a pathname but before the consuming process opens it, the attacker creates a symbolic link at that path. 3. ffmpeg or the TTS process follows the attacker-controlled link when writing output. 4. If the helper has greater filesystem privileges than the attacker, the write can target a file the attacker could not modify directly. 5. Alternatively, the attacker can substitute or read temporary audio data where filesystem permissions permit. This attack requires local access and successful timing of the race, but repeated voice processing can pro ...[truncated 488 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/tts_edge_wrapper.py:43
Finding

Unsafe Temporary File Creation in the Edge TTS Wrapper

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (27)

Tool Parameter Abuse

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

Content

Scanner excerpt · scripts/install.sh (reported line 159)May include surrounding context.

sh
PY
    then
        log_info "✓ TTS test passed"
        rm -f "/tmp/test_install.mp3"
    else
        log_error "TTS test failed"
        return 1

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

This is a true tool-parameter-abuse issue because untrusted input is passed into a shell command string. In the context of a voice handler, audio file paths may come from external sources or other components, making arbitrary command execution especially dangerous if the agent runs with elevated privileges or broad filesystem access.

Content

Scanner excerpt · scripts/voice_handler.py (reported line 34)May include surrounding context.

python
if audio_file.endswith('.ogg'):
                wav_file = tempfile.mktemp(suffix=".wav")
                cmd = f"ffmpeg -i '{audio_file}' -ar 16000 -ac 1 '{wav_file}' -y 2>/dev/null"
                subprocess.run(cmd, shell=True, check=True)
                audio_file = wav_file
            
            # Transcribe with faster-whisper

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description mandates messages.tts.providers.microsoft.voice = en-IE-ConnorNeural and messages.tts.providers.microsoft.lang = en-IE, which forces a specific language/locale configuration. This is a natural-language locale policy concern because the file does not present this as optional, user-selectable, or justified as region-specific compliance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The sample configuration sets voice to en-IE-ConnorNeural and lang to en-IE, presenting a single locale as the prescribed setup. Because the markdown does not mention alternatives or user choice, it risks violating language/locale policy expectations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script presents itself as an offline/local voice installer, but later explicitly states it uses the hosted Edge TTS service. This mismatch can mislead operators about privacy and data-flow expectations, causing them to install a component that sends text to a remote provider when they believed processing would remain local.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The installer automatically runs apt-get update and installs system packages if pip3 or ffmpeg are missing, but it does not clearly warn the user beforehand that it will perform network access and modify the base system. Silent or surprise system changes increase supply-chain and operational risk, especially when users may run the script with elevated privileges.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script upgrades pip and installs Python packages directly from the network without an explicit warning, pinning, or integrity controls. This exposes users to avoidable supply-chain risk and may violate expectations in environments where external code downloads require review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The installation test invokes Edge TTS functionality without clearly warning that the test may contact a remote service. Even though the sample text is benign, hidden outbound traffic during installation is risky in restricted or privacy-sensitive environments and reinforces the misleading 'offline' framing.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The installation summary tells users it restores local/helper voice capabilities while the configured TTS provider is a hosted service. In a voice-processing skill, that discrepancy is security-relevant because users may expose sensitive prompt or reply content to a third party without informed consent.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/test_skill.py (reported line 81)May include surrounding context.

python
print("\nTesting ffmpeg...")
    
    try:
        result = subprocess.run(["ffmpeg", "-version"], capture_output=True, text=True)
        if result.returncode == 0:
            # Extract version
            version_line = result.stdout.split('\n')[0]

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/test_skill.py (reported line 157)May include surrounding context.

python
print("⚠ Some tests failed. See above for details.")
        print("\nCommon issues:")
        print("1. Run install.sh to install dependencies")
        print("2. Ensure ffmpeg is installed: sudo apt-get install ffmpeg")
        print("3. Check Python packages: pip install faster-whisper piper-tts soundfile")
        return 1

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function sends arbitrary input text to edge_tts, which relies on an external network service, creating a confidentiality risk if callers pass secrets, personal data, or internal content. There is no disclosure, consent flow, or guardrail in the code to prevent sensitive text from being exfiltrated to a third-party service.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/tts_edge_wrapper.py (reported line 39)May include surrounding context.

python
cache_path = _cache_key(text, voice, rate, pitch, volume)
    if cache_path.exists():
        if output_file:
            subprocess.run(['cp', str(cache_path), output_file], check=True)
            return output_file
        return str(cache_path)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/tts_edge_wrapper.py (reported line 46)May include surrounding context.

python
tmp_out = Path(output_file) if output_file else Path(tempfile.mktemp(suffix='.mp3', prefix='edge_tts_'))
    asyncio.run(_synthesize(text, tmp_out, voice, rate, pitch, volume))
    tmp_out.parent.mkdir(parents=True, exist_ok=True)
    subprocess.run(['cp', str(tmp_out), str(cache_path)], check=True)
    if output_file and Path(output_file) != cache_path:
        return str(output_file)
    return str(cache_path)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The file-level documentation explicitly describes text-to-speech as "Edge TTS (local)". However, the code at L017 and L074 invokes an external wrapper script for Edge TTS rather than showing a clearly local synthesis implementation in this module, creating an intent/documentation mismatch about how TTS is actually performed.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
99% confidence
Finding

The ffmpeg command is built with string interpolation from the user-controlled audio_file path and executed with shell=True. An attacker can supply a filename containing shell metacharacters or unmatched quotes to break out of the quoting context and execute arbitrary commands as the current user.

Content

Scanner excerpt · scripts/voice_handler.py (reported line 34)May include surrounding context.

python
if audio_file.endswith('.ogg'):
                wav_file = tempfile.mktemp(suffix=".wav")
                cmd = f"ffmpeg -i '{audio_file}' -ar 16000 -ac 1 '{wav_file}' -y 2>/dev/null"
                subprocess.run(cmd, shell=True, check=True)
                audio_file = wav_file
            
            # Transcribe with faster-whisper

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/voice_handler.py (reported line 49)May include surrounding context.

python
""" % (self.stt_model, audio_file)
            ]
            
            result = subprocess.run(cmd, capture_output=True, text=True)
            if result.returncode == 0:
                data = json.loads(result.stdout.strip())
                return data['text'].strip()

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/voice_handler.py (reported line 75)May include surrounding context.

python
""" % (self.stt_model, audio_file)
            ]
            
            result = subprocess.run(cmd, capture_output=True, text=True)
            if result.returncode == 0:
                data = json.loads(result.stdout.strip())
                return data['text'].strip()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

This code invokes a separate Edge TTS wrapper with user-provided text, but the surrounding docstring and comments do not disclose any privacy or network implications of that operation. For code files, safety-relevant external processing should have some visible disclosure unless clearly warned elsewhere or obviously inherent to the skill's stated purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This is a markdown file, so SQP-2 applies to missing warnings in the skill description. Line L136 states that faster-whisper automatically downloads from HuggingFace, but the document does not warn users that using the feature will initiate network access and transfer system/request data to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The script creates directories, copies executables, and writes config.json into the installation path, all of which modify user files. While the script logs individual steps, it does not provide an upfront disclosure that running the installer will create and overwrite files under the chosen install directory.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code defaults to the hard-coded voice 'en-IE-ConnorNeural', which imposes a specific language and locale when no user choice is provided. This is a natural-language policy concern because the skill selects an English (Ireland) voice automatically rather than offering a neutral default or explicit opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file is documented and implemented as a test script for the 'edge_tts_voice_system', and earlier checks import and exercise 'edge_tts' and 'tts_edge_wrapper'. However, the remediation text tells users to install 'piper-tts', which contradicts the tested TTS stack and can mislead operators about the skill's actual dependencies.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The script persistently stores generated audio in /root/.openclaw/tts/cache, which can retain sensitive spoken content beyond the user session. If the synthesized text contains secrets or private information, the cached MP3 files create a local data-retention and disclosure risk, especially in shared or long-lived environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The default configuration hard-codes en-IE-ConnorNeural, which imposes a specific language and regional voice when the user does not explicitly choose one. This is a natural-language locale choice without any opt-in flow or documented reason for restricting the default to that locale.

Content

No source excerpt is available for this finding.