T07 · Tool Hijacking and Spoofing
- Location
scripts/orchestrator.py:22- Finding
Execution of an Unverified External Workspace Script
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This media skill mostly matches its stated purpose, but it uses broad execution and messaging authority in ways that need review before installation.
Review this skill before installing. It can execute local commands, download media, write files into the OpenClaw workspace, and send files or messages through configured WhatsApp or Telegram accounts. Installation is most appropriate only in an environment where the spotify-surface dependency is trusted and pinned, outbound recipients are controlled, and workspace file retention is acceptable.
scripts/orchestrator.py:22Execution of an Unverified External Workspace Script
scripts/orchestrator.py:101Caller-Controlled Messaging Destination Lacks Authorization Validation
The skill description understates several sensitive behaviors: outbound file delivery to external chat platforms, delegation to other local scripts, fixed-path workspace access, and execution of local/system binaries. This mismatch is dangerous because users and security controls may approve the skill for simple media handling while it actually performs broader data movement and code execution operations that materially expand the attack surface.
The skill advertises operational behavior that inherently requires network and shell-like execution capabilities, but it does not declare any tool scope or permissions boundaries. This is dangerous because it obscures the true execution surface from reviewers and enforcement systems, increasing the chance that a media request triggers undeclared downloads, command execution, or file handling without explicit authorization.
The skill states that media is downloaded into the workspace and then dispatched to WhatsApp or Telegram, but it omits a clear user warning that local files will be created and transmitted off-platform. This is dangerous because users may not realize their requested content, metadata, or adjacent workspace artifacts could be retained temporarily and sent to third-party services, creating privacy, compliance, and data leakage risks.
The manifest grants exec plus filesystem read/write permissions and explicitly describes downloading and delivering media, which are impactful operations that can create, modify, and exfiltrate files or invoke external tools. Without a clear user-facing warning or consent language, users may not understand that the skill can execute binaries and write downloaded content to disk, increasing the risk of misuse or unintended system changes.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
workspace = Path("/home/ky11rie/.openclaw/workspace")
# Check for ffmpeg
has_ffmpeg = subprocess.run(["which", "ffmpeg"], capture_output=True).returncode == 0
if not has_ffmpeg:
log_output("ffmpeg/ffprobe not found. Using fallback formats (m4a/mp4 direct).")
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# Determine source based on chat_target (WhatsApp or Telegram)
source = "whatsapp" if chat_target and chat_target.startswith("+") else "telegram"
cmd = ["python3", str(spotify_script_path), source, query]
spotify_result = subprocess.run(cmd, capture_output=True, text=True, check=True)
log_output(f"Spotify Surface output: {spotify_result.stdout}")
# spotify_surface script already handles output emission
return
The skill downloads media from external sources and immediately transmits it to a chat target without any user-facing confirmation, warning, or explicit authorization check in this file. In an agent context, that enables unintended outbound messaging, content relay, and possible policy or privacy violations if a prompt or tool call is manipulated to send media to arbitrary recipients.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
log_output(f"Executing yt-dlp: {' '.join(yt_dlp_command)}")
try:
subprocess.run(yt_dlp_command, check=True)
if download_path.exists():
message_user(chat_target, None, is_whatsapp=chat_target.startswith("+"), file_path=str(download_path))
log_output(f"Successfully sent {download_filename} to {chat_target}")
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
return
try:
subprocess.run(cmd_prefix, check=True)
except Exception as e:
log_output(f"Failed to send message/file to user: {e}")
No suspicious patterns detected.