Description
OpenClaw versions prior to 2026.2.19 contain a command injection vulnerability in Windows Scheduled Task script generation where environment variables are written to gateway.cmd using unquoted set KEY=VALUE assignments, allowing shell metacharacters to break out of assignment context. Attackers can inject arbitrary commands through environment variable values containing metacharacters like &, |, ^, %, or ! to achieve command execution when the scheduled task script is generated and executed.
Problem types
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (CWE-78)
Product status
Any version before 2026.2.19
2026.2.19 (semver)
Credits
tdjackey
References
github.com/...enclaw/security/advisories/GHSA-pj5x-38rw-6fph (GitHub Security Advisory (GHSA-pj5x-38rw-6fph))
github.com/...ommit/dafe52e8cf1a041d898cfb304a485fa05e5f58fb (Patch Commit)
www.vulncheck.com/...ent-variables-in-windows-scheduled-task (VulnCheck Advisory: OpenClaw < 2026.2.19 - Command Injection via Unescaped Environment Variables in Windows Scheduled Task Script Generation)