Openclaw cli: OpenClaw affected by BASH_ENV / ENV startup-file injection into spawned shell commands
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
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 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.
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 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.
External Links
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.