CVE-2026-22217: OpenClaw 2026.2.22 < 2026.2.23 - Arbitrary Binary Execution via $SHELL Environment Variable Trusted Prefix Fallback
OpenClaw version 2026.2.22 prior to 2026.2.23 contains an arbitrary code execution vulnerability in shell-env that allows attackers to execute attacker-controlled binaries by exploiting trusted-prefix fallback logic for the $SHELL variable. An attacker can influence the $SHELL environment variable on systems with writable trusted-prefix directories such as /opt/homebrew/bin to execute arbitrary binaries in the OpenClaw process context.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
OpenClawto a version that resolves this vulnerability.Fixed in 2026.2.23 - Compensating control
Prevent unprivileged users from writing to trusted-prefix directories referenced by OpenClaw. For example, change permissions on /opt/homebrew/bin to remove write access for non-administrative users so only administrators/root can write to that directory.
- Operational
Inspect trusted-prefix directories (for example /opt/homebrew/bin) for unexpected or attacker-controlled binaries; remove or quarantine any unapproved binaries and verify the integrity of OpenClaw processes.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-22217?
CVE-2026-22217 is categorized as a critical vulnerability due to its potential for arbitrary code execution.
How do I fix CVE-2026-22217?
To mitigate CVE-2026-22217, update OpenClaw to version 2026.2.23 or later.
What causes CVE-2026-22217?
CVE-2026-22217 is caused by a flaw in OpenClaw's shell-env handling of the $SHELL environment variable.
Who is affected by CVE-2026-22217?
CVE-2026-22217 affects OpenClaw versions below 2026.2.23.
What are the potential risks of CVE-2026-22217?
Exploiting CVE-2026-22217 can allow attackers to execute arbitrary binaries on the affected system.