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
- 88% confidence
- Finding
- The concat demuxer input file is generated by writing raw clip paths into ffmpeg's concat list using single-quoted entries without escaping embedded quotes or special characters. A crafted filename containing quote characters or concat directives can break out of the intended file entry and inject additional ffmpeg concat instructions, causing unintended file reads or processing of attacker-chosen media.
