subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
f.write(f"file '{cf}'\n") no_subs = os.path.join(tmpdir, "no_subs.mp4") subprocess.run( [FFMPEG, "-y", "-f", "concat", "-safe", "0", "-i", concat_list, "-c", "copy", no_subs], capture_output=True, check=True,- Confidence
- 92% confidence
- Finding
- The script writes a concat demuxer list and then runs ffmpeg with '-safe 0', disabling path safety checks. Because clip file paths ultimately derive from filesystem state and temporary/output handling, unsafe path handling in concat manifests can enable ffmpeg to consume unexpected files or special paths if an attacker can influence filenames or the working environment.
