Tainted flow: 'cmd' from os.getenv (line 32, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
"-i", RTSP_URL, "-frames:v", "1", "-f", "image2", "-" ] result = subprocess.run(cmd, capture_output=True) return result.stdout def capture_audio(duration=3):- Confidence
- 88% confidence
- Finding
- The command includes executable/configuration values taken from environment variables, especially FFMPEG and RTSP_URL, and then executes them without validation. If an attacker can influence the environment, they can replace the ffmpeg binary path with an arbitrary program or point ffmpeg at attacker-controlled RTSP content, turning a camera utility into a code-execution or unsafe-parser exposure path.
