Tainted flow: 'cmd' from os.environ.get (line 273, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
raise RuntimeError("openclaw command not found; set OPENCLAW_BIN to the absolute path") cmd = [openclaw_bin, "sessions", "--all-agents", "--json"] proc = subprocess.run( cmd, text=True, stdout=subprocess.PIPE,- Confidence
- 86% confidence
- Finding
- The executable path comes from OPENCLAW_BIN and is executed without trust validation, so any actor able to influence the environment can cause this skill to run an arbitrary program. In an agent/runtime context, environment variables are often easier to tamper with than source code, making this a realistic command-execution primitive.
