subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
] try: subprocess.run(cmd, check=True, capture_output=True, text=True) print(f"Done: {output_path}") except subprocess.CalledProcessError as e: print(f"FFmpeg error:\n{e.stderr}", file=sys.stderr)- Confidence
- 85% confidence
- Finding
- Although subprocess.run is used safely with an argv list, the ffmpeg invocation embeds user-derived chapter titles and metadata into a complex filter expression passed via -vf. ffmpeg filter languages are parser-driven and historically fragile; insufficient escaping of drawtext content can lead to filter injection, parse confusion, or processing of attacker-controlled file-like directives within ffmpeg rather than shell injection.
