subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
with open(ass_file, "w") as f: f.write(content) subprocess.run([ "ffmpeg", "-y", "-i", video_path, "-vf", f"ass={ass_file}", "-c:v", "libx264", "-c:a", "copy", output_path ], capture_output=True)- Confidence
- 84% confidence
- Finding
- The ffmpeg ass filter is fed a temp-file path directly inside a filter expression string. If the temp path or related path handling contains ffmpeg-special characters such as ':' or quotes on some platforms, filter parsing can break or reference unintended locations, creating injection-like behavior within ffmpeg's own parser.
