T09 · Insecure Skill Coding Practices
- Location
SKILL.md:41- Finding
Command Injection Through Unsafely Interpolated TTS Text
- Content
View full analysis
\", \"stream\": false, \"voice_setting\": { \"voice_id\": \"\", \"speed\": 0.75 }, \"audio_setting\": { \"format\": \"mp3\" } }" -o slow.json jq -r '.data.audio' slow.json | xxd -r -p > standard_slow.mp3 # Normal version (speed 1.0) curl -s -X POST https://api.senseaudio.cn/v1/t2a_v2 \ -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \ -H "Content-Type: application/json" \ -d "{ \"model\": \"SenseAudio-TTS-1.0\", \"text\": \"\", \"stream\": false, \"voice_setting\": { \"voice_id\": \"\", \"speed\": 1.0 }, \"audio_setting\": { \"format\": \"mp3\" } }" -o normal.json jq -r '.data.audio' normal.json | xxd -r -p > standard_normal.mp3 ``` ### Technical Analysis The practice text originates from the user and is placed inside a double-quoted shell argument. The instructions do not require JSON-safe serialization or shell-safe handling before replacing ``. A quotation mark in the supplied text can terminate the surrounding shell string. Shell operators, substitutions, or additional commands following that quotation mark may then be interpreted by the command shell. Ordinary text containing quotation marks or backslashes can also produce malformed JSON even when it is not intentionally malicious. The same issue applies to `` if that value ever becomes externally controllable. This vulnerability is present when an agent or runner implements the documented command by directly replacing the placeholders and invokes it through a shell. ## ...[truncated 912 chars]- Remediation
View remediation
