Tainted flow: 'systemctl' from os.environ.get (line 233, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
systemctl = os.environ.get("COUNCIL_SYSTEMCTL") or shutil.which("systemctl") if not systemctl: return {"available": False, "reason": "systemctl not found"} process = subprocess.run( [ systemctl, "--user",- Confidence
- 76% confidence
- Finding
- The code allows the executable path for systemctl to be overridden by the COUNCIL_SYSTEMCTL environment variable and then executes it. In environments where an attacker can influence process environment or deployment configuration, this becomes arbitrary code execution under the Open WebUI user's privileges rather than a simple systemctl status query.
