Tainted flow: 'piper_bin' from os.environ.get (line 41, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
path.unlink() try: subprocess.run( [str(piper_bin), "--model", str(model_path), "--output_file", str(wav_path)], input=text.encode("utf-8"), capture_output=True,- Confidence
- 81% confidence
- Finding
- The executable path ultimately depends on the WORKSPACE environment variable, so an attacker who can influence the process environment or workspace contents could cause the script to run an attacker-controlled binary instead of the intended Piper executable. Because this is direct process execution, successful exploitation can lead to arbitrary code execution under the privileges of the running agent.
