Executive brief
OpenClaw is a Windows daemon management tool that generates scheduled task startup scripts. A vulnerability in script generation allows locally authenticated users to inject arbitrary commands into the task execution context by supplying specially crafted metacharacters or line-break sequences when the service is installed or reconfigured. This could enable privilege escalation or unauthorized system-level command execution.
Technical details
The vulnerability is a command injection flaw in OpenClaw's Windows daemon startup script generation (src/daemon/schtasks.ts). The root cause is incomplete quoting and escaping of cmd metacharacters and expansion-sensitive characters in generated gateway.cmd files, combined with missing CR/LF validation. An attacker with local access who controls values passed during service installation or runtime (e.g., via environment variables or configuration) can inject unescaped cmd metacharacters or line breaks to achieve arbitrary command execution when the Windows scheduled task runs. The vulnerability requires local access and ability to influence script generation inputs, but does not require elevated privileges initially. A fix is available in version 2026.2.19 or later, which properly quotes metacharacters, escapes expansion characters (%, !), and validates against CR/LF injection.
Affected products
- OpenClaw openclaw <= 2026.2.17
Timeline
- 2026-02-21: disclosed
- 2026-02-19: patched: Patched version 2026.2.19 planned
- 2026-03-03: advisory