subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
] print(f"Running ffmpeg overlay...") result = subprocess.run(cmd, capture_output=True, text=True) if result.returncode != 0: print(f"ERROR:\n{result.stderr}", file=sys.stderr) sys.exit(result.returncode)- Confidence
- 82% confidence
- Finding
- Although ffmpeg is launched without a shell, untrusted caption text and color parameters are embedded directly into ffmpeg filter expressions. In ffmpeg, filtergraph syntax has its own metacharacters and escaping rules, so insufficient escaping can let crafted input break the filter, alter processing behavior, or reference unintended resources within ffmpeg's parser.
