Skip to main content
EPSS 0.1%top 98%

Openclaw cli: OpenClaw: shell-env trusted-prefix fallback allowed attacker-controlled binary execution via $SHELL (CVE-2026-22217)

0
Medium
Published: 08/13/2026 (08/13/2026, 17:21:32 UTC)
Source: GCVE Database
Product: openclaw-cli

Description

OpenClaw CLI versions from 2026.2.22 up to 2026.2.22-2 contain a vulnerability in shell environment fallback logic that allows execution of attacker-controlled binaries if the runtime $SHELL environment variable can be influenced and a trusted prefix directory is writable. The vulnerability arises because the software accepts shells located in certain hardcoded trusted directories, which may be writable in some environments like Homebrew. The issue is fixed in version 2026.2.23 by removing the trusted-prefix fallback and only trusting shells explicitly listed in /etc/shells or falling back to /bin/sh.

CVSS v3.1

Score 6.1medium

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L

Affected software

Homebrewmore threats →ghsa
openclaw-cli
pkg:brew/openclaw-cli
Affected versions
<2026.7.1

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

AILast updated: 10/04/2026, 13:14:52 UTC

Technical Analysis

OpenClaw CLI's shell-env fallback mechanism allowed selection of a shell executable either from /etc/shells or from hardcoded trusted prefixes (/bin, /usr/bin, /usr/local/bin, /opt/homebrew/bin, /run/current-system/sw/bin). This fallback permitted execution of attacker-controlled binaries if an attacker could influence the $SHELL environment variable and if any of these trusted prefix directories were writable, such as common Homebrew layouts under /opt/homebrew/bin. The selected shell was executed as a login shell for environment probing, enabling local or runtime environment attackers to execute arbitrary binaries in the OpenClaw process context. The vulnerability is tracked as CVE-2026-22217 and has a CVSS 3.1 score of 6.1 (medium severity). The fix, released in version 2026.2.23, removes the trusted-prefix fallback and restricts shell selection to those explicitly registered in /etc/shells or defaults to /bin/sh.

Potential Impact

An attacker with local or runtime environment influence can execute arbitrary binaries in the context of the OpenClaw process by manipulating the $SHELL environment variable when a trusted prefix directory is writable. This can lead to integrity compromise of the affected system or process. The vulnerability does not impact confidentiality but has a high impact on integrity and a low impact on availability.

Mitigation Recommendations

A patch is available and has been released in OpenClaw CLI version 2026.2.23. Users should upgrade to version 2026.2.23 or later to remediate this vulnerability. The fix removes the fallback to trusted-prefix directories and restricts shell selection to shells explicitly listed in /etc/shells or defaults to /bin/sh, preventing execution of attacker-controlled binaries via $SHELL manipulation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
BREW-openclaw-cli-CVE-2026-22217
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
3.1

Threat ID: 6ac245d012601ec6a3167ff3

Added to database: 10/04/2026, 12:25:52 UTC

Last enriched: 10/04/2026, 13:14:52 UTC

Last updated: 10/04/2026, 16:08:36 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses