Openclaw cli: OpenClaw has a Command Injection via unescaped environment assignments in Windows Scheduled Task script generation (CVE-2026-22176)
Description
OpenClaw CLI versions up to 2026.2.17 have a command injection vulnerability in the Windows Scheduled Task script generation process. The vulnerability arises because environment variable assignments in the generated batch script are unquoted, allowing Windows shell metacharacters in environment values to break out of the intended assignment context. This can lead to command execution when the scheduled task runs. The issue is patched in version 2026.2.19 and later. The risk is generally low for single-user, localhost-only setups but becomes significant when environment values come from less-trusted sources such as shared configs or automation scripts.
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
OpenClaw CLI versions <= 2026.2.17 generate Windows Scheduled Task helper batch scripts with environment variable assignments using unquoted 'set KEY=VALUE' commands. This allows command injection via shell metacharacters in environment variable values, enabling arbitrary command execution when the scheduled task runs. The vulnerability is fixed in version >= 2026.2.19 by quoting assignments and escaping metacharacters properly. The fix also includes parser updates and regression tests to ensure safe handling of environment variables.
Potential Impact
An attacker who can influence environment variable values used during the scheduled task script generation can execute arbitrary commands with the privileges of the scheduled task on Windows systems. This can lead to unauthorized code execution. The vulnerability is less impactful on single-user, localhost-only setups but poses a significant risk in multi-user or automated environments where environment variables may be controlled by less-trusted parties.
Mitigation Recommendations
A patch is available and should be applied by upgrading OpenClaw CLI to version 2026.2.19 or later. This update properly quotes and escapes environment variable assignments in the Windows Scheduled Task script, preventing command injection. Users relying on less-trusted configuration inputs should prioritize this upgrade to mitigate risk.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-openclaw-cli-CVE-2026-22176
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6ac245d112601ec6a3168001
Added to database: 10/04/2026, 12:25:53 UTC
Last enriched: 10/04/2026, 13:15:21 UTC
Last updated: 10/04/2026, 16:08:36 UTC
Views: 3
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.