Openclaw cli: OpenClaw Windows Scheduled Task script generation allowed local command injection via unsafe cmd argument handling (CVE-2026-31994)
Description
OpenClaw CLI versions up to 2026.2.17 have a local command injection vulnerability in Windows Scheduled Task script generation due to unsafe handling of cmd arguments in generated gateway.cmd files. This allows cmd metacharacter-only values to be emitted without proper quoting or escaping, potentially causing unintended command execution when the scheduled task runs. The issue is fixed in version 2026.2.19 and later.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in OpenClaw CLI affects Windows daemon startup script generation by improperly quoting and escaping command-line arguments in generated scheduled task scripts (gateway.cmd). Specifically, cmd metacharacter-only values can be injected without safe quoting or escaping, and CR/LF characters are not properly guarded against, leading to possible local command injection when the scheduled task executes. The fix involves separating argument quoting for schtasks and batch scripts, quoting metacharacter arguments, escaping expansion characters (% and !), rejecting CR/LF in command arguments and environment assignments, and adding regression tests.
Potential Impact
This vulnerability allows a local attacker with control over values used in service script generation (such as install-time or runtime arguments or environment variables) on Windows systems to execute unintended commands in the context of the scheduled task. This could lead to privilege escalation or unauthorized code execution locally on affected systems.
Mitigation Recommendations
A patch is available in OpenClaw CLI version 2026.2.19 and later. Users should upgrade to this version or newer to remediate the vulnerability. Until the patch is applied, avoid supplying untrusted or metacharacter-containing arguments to the service script generation process. No additional vendor advisory states that no action is required.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-openclaw-cli-CVE-2026-31994
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6ac245c112601ec6a31670a8
Added to database: 10/04/2026, 12:25:37 UTC
Last enriched: 10/04/2026, 13:06:53 UTC
Last updated: 10/04/2026, 16:08:37 UTC
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.