subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
sample, spatial_context, project_root, source, source_s, source_hash, ) source_frame = source_frames / f"source-{sample['file_stem']}.png" subprocess.run([ "ffmpeg", "-hide_banner", "-loglevel", "error", "-y", "-ss", f"{background['seek_s']:.6f}", "-i", background["path"], "-frames:v", "1", str(source_frame),- Confidence
- 75% confidence
- Finding
- This code invokes ffmpeg on a user-influenced input path ('background["path"]' or source video) without constraining the protocol or argument semantics of that path. Because ffmpeg interprets inputs beyond plain local files, a crafted path from project data could trigger unintended network access, local file reads via special protocols, or processing of hostile media through a powerful external parser, increasing SSRF/LFI and decoder attack surface in an agent workflow.
