subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not os.path.exists(ffmpeg): ffmpeg = "ffmpeg" subprocess.run([ffmpeg, "-y", "-i", wav_path, "-codec:a", "libmp3lame", "-b:a", "128k", mp3_path], capture_output=True, timeout=30) # Save to soundscape directory- Confidence
- 84% confidence
- Finding
- The script falls back to executing `ffmpeg` from the current PATH if `~/.local/bin/ffmpeg` is absent. In an attacker-controlled or untrusted environment, PATH hijacking could cause execution of a malicious binary, giving arbitrary code execution under the user's account.
