Skip to main content

Openclaw cli: OpenClaw affected by BASH_ENV / ENV startup-file injection into spawned shell commands

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

Description

OpenClaw CLI versions up to 2026.2.19-2 are affected by a startup-file injection vulnerability involving the BASH_ENV and ENV environment variables. This flaw allows unintended shell command execution when attacker-controlled environment values are inherited by spawned shell commands. The vulnerability requires local or privileged access to influence environment inputs and cannot be triggered remotely without authentication. A fix has been committed and will be released in version 2026.2.21.

CVSS v4.0

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

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:29:18 UTC

Technical Analysis

The OpenClaw CLI is vulnerable to startup-file injection via the BASH_ENV and ENV environment variables, which can lead to unintended pre-command shell execution. This occurs when attacker-controlled environment variables are admitted and inherited by host command execution paths. The fix hardens environment handling by blocking dangerous environment keys and prefixes, sanitizing inherited environment variables, and aligning sanitization policies across platforms. Exploitation requires local or privileged influence over configuration or environment inputs, with no standalone remote unauthenticated trigger.

Potential Impact

The impact is medium severity because exploitation requires local or privileged access to manipulate environment variables or configuration inputs. There is no remote unauthenticated exploitation vector. Successful exploitation could lead to unintended shell command execution in the context of spawned commands, potentially allowing privilege escalation or unauthorized command execution within the affected environment.

Mitigation Recommendations

A patch is available and planned for release in OpenClaw CLI version 2026.2.21. Users should upgrade to this version once it is published to remediate the vulnerability. The fix includes environment sanitization and blocking of dangerous environment variables to prevent injection. Until the patch is applied, avoid running the software with untrusted environment inputs or configurations that could be influenced by attackers.

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-w9cg-v44m-4qv8
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
4.0

Threat ID: 6ac2458012601ec6a316406a

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

Last enriched: 10/04/2026, 12:29:18 UTC

Last updated: 10/04/2026, 12:29:18 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