Openclaw cli: OpenClaw's shell startup env injection bypasses system.run allowlist intent (RCE class) (CVE-2026-32056)
Description
OpenClaw CLI versions up to 2026.2.21-2 are vulnerable to an environment injection flaw that allows attacker-controlled shell startup files to execute before system.run's allowlist commands. This occurs because environment sanitization does not block certain startup override keys like HOME and ZDOTDIR, enabling remote code execution via crafted shell environments. A fix is available in version 2026.2.22 and later.
CVSS v3.1
Score 7.5high
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 OpenClaw CLI's system.run environment sanitization blocks many dangerous environment keys but fails to block startup-sensitive override keys such as HOME and ZDOTDIR. This allows attackers to specify malicious shell startup files (e.g., .bash_profile or .zshenv) that execute before the allowlist-evaluated command bodies, bypassing the intended command restrictions. Exploits involve setting HOME with bash -lc or ZDOTDIR with zsh -c to trigger execution of attacker-controlled startup scripts. The vulnerability affects openclaw versions up to 2026.2.21-2 and is fixed starting from 2026.2.22.
Potential Impact
Successful exploitation allows remote code execution with the privileges of the affected process by executing attacker-controlled shell startup files before the allowlist command is evaluated. This can lead to full compromise of the environment running OpenClaw CLI commands.
Mitigation Recommendations
A patch is available and should be applied by upgrading to OpenClaw CLI version 2026.2.22 or later. This update addresses the environment sanitization bypass allowing startup environment overrides. Until patched, avoid running untrusted commands with system.run or restrict environment variables HOME and ZDOTDIR in execution contexts.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-openclaw-cli-CVE-2026-32056
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 3.1
Threat ID: 6ac245b912601ec6a3166bd5
Added to database: 10/04/2026, 12:25:29 UTC
Last enriched: 10/04/2026, 13:02:20 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.