Tainted flow: 'command' from os.environ.get (line 246, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
str(path), str(prefix), ] result = subprocess.run(command, capture_output=True, text=True, timeout=120, check=False) if result.returncode != 0 or not rendered.is_file(): rendered.unlink(missing_ok=True) detail = (result.stderr or result.stdout or "unknown pdftoppm error").strip()- Confidence
- 84% confidence
- Finding
- The executable path is taken from the PDFTOPPM_BIN environment variable and then executed. In a hostile or multi-tenant execution environment, an attacker who can influence environment variables could cause execution of an arbitrary binary whenever a PDF requiring rendering is processed, turning document conversion into unintended code execution.
