os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
# 使用 say 命令生成语音 cmd = f'say -v "Ting-Ting" -o "{temp_aiff}" "{text}"' os.system(cmd) # 转换为 mp3 cmd = f'ffmpeg -i "{temp_aiff}" -codec:a libmp3lame -qscale:a 2 "{output_path}" -y 2>/dev/null'- Confidence
- 97% confidence
- Finding
- The code builds a shell command with untrusted text content and executes it via os.system. Because the story text is inserted directly inside a quoted shell string for the macOS say command, crafted input containing shell metacharacters or quote-breaking content could trigger command injection and arbitrary local command execution.
