Tainted flow: 'FFMPEG' from os.environ.get (line 31, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
def to_pcm(path): if path.endswith(".pcm"): return open(path, "rb").read() out = subprocess.run([FFMPEG, "-v", "error", "-i", path, "-vn", "-ac", "1", "-ar", "16000", "-f", "s16le", "-"], capture_output=True) return out.stdout- Confidence
- 87% confidence
- Finding
- The executable path comes from the FFMPEG_BIN environment variable and is passed directly to subprocess.run. If an attacker can influence the environment in the agent runtime, they can replace ffmpeg with an arbitrary program and achieve code execution when transcription runs.
