T09 · Insecure Skill Coding Practices
- Location
scripts/voice_reply.py:69- Finding
Caller-Controlled Output Path Enables Arbitrary File Overwrite and Deletion
- Content
View full analysis
2 else None result_path = tts_to_ogg(text, output) ``` ### Technical Analysis The second command-line argument is accepted as an output path without validation or confinement to an approved workspace. The script then: 1. Creates parent directories for that path. 2. Derives a predictable MP3 path using string replacement. 3. Opens the derived path using `wb`, truncating an existing file. 4. invokes FFmpeg with `-y`, permitting unconditional overwrite of the requested output. 5. Deletes the derived MP3 path after conversion. Neither the output nor temporary path is canonicalized and checked against an authorized directory. The implementation also does not re ...[truncated 2318 chars]- Remediation
View remediation
