T09 · Insecure Skill Coding Practices
- Location
scripts/send-voice.cjs:27- Finding
Arbitrary PowerShell Code Execution Through Unsanitized Speech Text
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a coherent WeCom voice-message purpose, but its script handles user input unsafely and can send content to an under-disclosed default recipient.
Review this carefully before installing. It sends generated audio externally through WeCom, defaults to a named recipient if none is provided, and currently has command-injection flaws in both message text and recipient handling. It should require an explicit recipient, use argument-safe process APIs, remove or secure temporary files, and clearly confirm the destination before sending.
scripts/send-voice.cjs:27Arbitrary PowerShell Code Execution Through Unsanitized Speech Text
scripts/send-voice.cjs:68Shell Command Injection Through the Target User Argument
scripts/send-voice.cjs:9Undisclosed Hard-Coded Default Recipient Causes Unintended Data Disclosure
scripts/send-voice.cjs:12Predictable Shared Temporary Script and Persistent Voice Artifacts
The script writes user-supplied message text into a temporary PowerShell script on disk, which creates an unnecessary local plaintext artifact of potentially sensitive content. Although it attempts cleanup, the file may remain if the process crashes or is interrupted, allowing other local users or software to recover message contents.
The manifest describes a text-to-speech and send workflow, but the implementation achieves it by spawning external executables: PowerShell with ExecutionPolicy Bypass for TTS generation and ffmpeg.exe for transcoding. Launching arbitrary system subprocesses is a broader and more sensitive capability than the stated business purpose and is not explicitly disclosed in the manifest description.
The script invokes openclaw message send to transmit the generated AMR file to a WeCom recipient. While the step is labeled 'Send', there is no explicit disclosure that the synthesized audio will be delivered to another user/channel, which is a network or external transmission operation that should be clearly warned about.
The trigger phrase "voice message" is generic and likely to appear in normal user conversation, which can cause unintended activation of the skill. Because this skill sends generated content into WeCom, accidental triggering could lead to unreviewed message generation and delivery to contacts or channels.
The description explains the workflow but does not clearly warn users that text is converted to speech, written to a local media directory, and then sent onward. This lack of disclosure increases the risk of users unintentionally causing sensitive content to be persisted locally and transmitted through WeCom.
Forcing a specific voice/language (Microsoft Huihui Desktop, Chinese) without user opt-in can cause content to be spoken in an unexpected language or accent, creating privacy, usability, and misdelivery risks in enterprise messaging contexts. While not inherently code-execution dangerous, it can cause the wrong message to be conveyed or expose that automation is being used without the sender's informed choice.
The PowerShell TTS configuration hard-codes Microsoft Huihui Desktop, which implies a fixed locale/voice choice without offering the user an alternative. This is a natural-language policy concern because it enforces a language or locale preference rather than allowing user selection.