Executive brief
OpenClaw is a deployment automation tool used to manage services across Windows environments. Versions prior to 2026.2.19 contain a command injection flaw in the Windows scheduled task startup script generator. A local attacker with control over service configuration parameters can inject arbitrary shell commands that execute with scheduled task privileges, potentially compromising system integrity or gaining elevated code execution.
Technical details
This vulnerability exists in the Windows daemon startup script generation logic (src/daemon/schtasks.ts) where cmd metacharacters and shell expansion characters are not properly escaped or quoted when constructing gateway.cmd batch script files. The vulnerability class is OS command injection (CWE-78). Attackers can exploit this by injecting cmd metacharacter-only values, carriage return/line feed sequences, or characters sensitive to cmd variable expansion (% and !) into fields that feed script generation, such as install-time arguments, runtime parameters, or environment-derived values. The attack requires local access and ability to influence service configuration at install time or runtime. The fix hardens script generation by separating schtasks argument quoting from batch script quoting, properly escaping expansion-sensitive characters, rejecting CR/LF sequences, and adding regression test coverage. Patched versions 2026.2.19 and later are available.
Affected products
- OpenClaw openclaw < 2026.2.19
Timeline
- 2026-02-21: disclosed: Advisory GHSA-mqr9-vqhq-3jxw published on GitHub
- 2026-02-19: patched: Fix commit 280c6b117b2f0e24f398e5219048cd4cc3b82396 authored; patch version 2026.2.19 planned for next npm release
- 2026-03-19: advisory: Duplicate advisory GHSA-5gqg-mqh5-2v39 published and withdrawn
References
- https://github.com/openclaw/openclaw/security/advisories/GHSA-mqr9-vqhq-3jxw
- https://github.com/openclaw/openclaw/commit/280c6b117b2f0e24f398e5219048cd4cc3b82396
- https://github.com/openclaw/openclaw
- https://www.vulncheck.com/advisories/openclaw-local-command-injection-via-unsafe-cmd-argument-handling-in-windows-scheduled-task