subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
voice=shlex.quote(voice), rate=shlex.quote(rate), ) result = subprocess.run(cmd_str, shell=True, capture_output=True, text=True) else: tts_path = _detect_tts() cmd = [- Confidence
- 99% confidence
- Finding
- This code takes a user-supplied command template from --tts-command, interpolates values into it, and executes it with shell=True. Even though individual placeholders are shell-quoted, the template itself is fully attacker-controlled, so a malicious caller can append arbitrary shell syntax or substitute a completely different command for code execution.
