subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"-an", "-sn", "-dn", "-map_metadata", "-1", "-write_tmcd", "0", *delivery_encoder_args(), str(part), ] subprocess.run(command, cwd=lut_path.parent if lut_path else None, check=True, capture_output=True) probe = _probe(part) _check_probe(probe, width, height, num, den, duration) subprocess.run(["ffmpeg", "-v", "error", "-i", str(part), "-map", "0:v:0", "-f", "null", "-"], check=True, capture_output=True)- Confidence
- 72% confidence
- Finding
- Although the ffmpeg invocation uses a safe argv list, it builds a complex filter string from partially data-driven values, including a LUT filename and selection-derived timing/filter parameters. Because ffmpeg filtergraphs are interpreted by ffmpeg itself, insufficient validation of values incorporated into -vf can create parser/option injection into the media-processing layer, potentially causing unintended file reads or unexpected processing behavior.
