subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
for seg in segment_files: f.write(f"file '{seg}'\n") subprocess.run([ 'ffmpeg', '-y', '-f', 'concat', '-safe', '0', '-i', concat_file, '-c', 'copy', concat_video ], capture_output=True, check=True)- Confidence
- 85% confidence
- Finding
- The concat demuxer is invoked with '-safe 0', and the concat file is populated with file paths written without escaping or strict validation. If an attacker can influence segment file names or the concat file contents, ffmpeg may be tricked into reading unintended files or misparsing entries, creating a file-handling injection issue in a privileged automation context.
