os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
out = speak(args.text, voice=voice, speed=speed, output=args.output) if args.play and out: os.system(f"afplay {out}") if __name__ == "__main__": main()- Confidence
- 98% confidence
- Finding
- The code passes a user-influenced file path directly into a shell command via os.system(f"afplay {out}"). Because args.output is attacker-controlled and speak() returns that path, a crafted output value containing shell metacharacters can trigger arbitrary command execution on the local machine when --play is used.
