Tainted flow: 'OPENCLAW_LOG' from os.environ.get (line 24, credential/environment) → subprocess.Popen (code execution)
Medium
- Category
- Data Flow
- Content
# 重启Gateway(需要相应权限) subprocess.run(["pkill", "-f", "openclaw-gateway"], capture_output=True) time.sleep(2) subprocess.Popen( ["nohup", "openclaw", "gateway", "start"], stdout=open(OPENCLAW_LOG, "a"), stderr=subprocess.STDOUT- Confidence
- 89% confidence
- Finding
- `OPENCLAW_LOG` is derived from environment variables or CLI-controlled paths and is opened for append before being attached to the spawned process. If an attacker can influence the environment or arguments under a higher-privilege execution context, they may redirect writes to arbitrary files or abuse symlinks, causing file clobbering or privilege-boundary issues.
