Skip to main content

Openclaw cli: OpenClaw shell-env fallback trusted startup env and could execute attacker-influenced login-shell paths

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.1.5 up to and including 2026.2.21-2 contain a vulnerability in the shell environment fallback mechanism. The issue involves trusting environment variables such as SHELL, HOME, and ZDOTDIR during startup, which could allow execution of attacker-influenced login shell startup paths before environment keys are loaded. This can lead to local code execution if an attacker can influence environment or configuration input. The vulnerability is not exploitable remotely and depends on crossing local trusted operator boundaries. A fix is available in the mainline and planned for release in version 2026.2.22, which hardens environment variable handling and sanitizes the shell fallback execution environment.

CVSS v3.1

Score 5.3medium

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/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, 12:33:34 UTC

Technical Analysis

The vulnerability in OpenClaw CLI affects the shell-env fallback startup process where environment variables like SHELL, HOME, and ZDOTDIR were trusted and used to execute login shell commands. Specifically, the code executed `${SHELL} -l -c "env -0"` with inherited runtime environment, allowing attacker-influenced environment variables to trigger unintended command execution. The fix involves blocking these variables during config environment ingestion, sanitizing the shell fallback environment by pinning HOME to the real user home and dropping ZDOTDIR and other dangerous startup variables, and adding regression tests. This vulnerability allows local code execution under conditions where attacker-controlled environment or config input reaches the shell-env fallback, but it is not a public remote vulnerability.

Potential Impact

The impact is a local code execution risk in environments where an attacker can influence environment or configuration inputs that reach the shell-env fallback in OpenClaw CLI. This could lead to execution of arbitrary commands in the context of the OpenClaw host process. The vulnerability requires local access and crossing of trusted operator boundaries, so it is not exploitable remotely. Confidentiality, integrity, and availability impacts are rated low to medium given the local and privilege requirements.

Mitigation Recommendations

A fix is available and planned for release in OpenClaw CLI version 2026.2.22. The fix hardens environment variable handling by blocking SHELL, HOME, and ZDOTDIR during configuration environment ingestion and sanitizes the shell fallback execution environment. Users should upgrade to version 2026.2.22 or later once released. Until then, avoid running OpenClaw CLI in environments where untrusted users can influence environment or configuration inputs that affect shell fallback execution. No additional mitigations are indicated by the vendor advisory.

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-GHSA-5h2c-8v84-qpvr
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
3.1

Threat ID: 6ac2458812601ec6a31640a6

Added to database: 10/04/2026, 12:24:40 UTC

Last enriched: 10/04/2026, 12:33:34 UTC

Last updated: 10/04/2026, 12:33:34 UTC

Views: 1

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