T09 · Insecure Skill Coding Practices
- Location
send_image.mjs:67- Finding
Shell Command Injection Through Caller-Controlled CLI Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims, but its send helper can execute shell-interpreted user input and has staging-path issues that make it unsafe without review.
Install only after the maintainer removes shell: true or otherwise prevents shell interpretation, validates channel and target values, uses a unique home-directory-based staging directory, and pins dependencies. Treat this as a Review item rather than proven malware: the core image-send behavior is disclosed, but the implementation has high-impact safety bugs.
send_image.mjs:67Shell Command Injection Through Caller-Controlled CLI Arguments
send_image.mjs:19Predictable and Incorrectly Resolved Media Staging Path
SKILL.md:49Unpinned Third-Party Dependency Installation
The trigger keywords are broad terms like "image," "media," "photo," and "send," which are common in normal conversation and can cause the skill to activate in unintended contexts. Because this skill copies local files, may compress them, and sends them to an external channel, accidental invocation could lead to unintended disclosure of local images.
The skill documentation describes copying local files, transmitting media to a channel, and deleting temporary files, but it does not clearly warn the user that local data will be accessed and sent externally. In a file-handling skill, missing disclosure increases the risk of users invoking it without understanding the privacy and data-handling consequences, which can result in accidental exfiltration or loss of temporary artifacts needed for audit or recovery.
Natural-language strings in the header comments and runtime error messages are written only in Chinese, with no opt-in or indication that the skill is intended solely for Chinese-speaking users. This can violate language/locale policy when a skill imposes a specific language without user choice or justified regional scope.
This code writes a user-supplied image into a local media directory and may create a compressed derivative, which affects user data on disk. While there are terse comments and success/failure logs, there is no clear user-facing disclosure at the point of execution that the file will be copied into ~/.openclaw/media/browser/ and then deleted for non-qqbot channels.
The script invokes openclaw via spawn(..., { shell: true }) while passing user-controlled values such as channel, target, message, and the derived image path. Using a shell here creates command-injection risk if any argument contains shell metacharacters, turning a simple image-send utility into arbitrary command execution.
The script invokes an external command to send the image and optional message to a specified channel/target, which is a network-affecting operation involving user data. Although the file header says it sends a local image to a channel, the execution path lacks a clear runtime warning or confirmation that content will be transmitted to an external destination.
Detected: suspicious.dangerous_exec