Summary
OpenClaw affected by BASH_ENV / ENV startup-file injection into spawned shell commands
BASH_ENV / ENV startup-file injection could lead to unintended pre-command shell execution when attacker-controlled environment values were admitted and then inherited by host command execution paths.
Affected Packages / Versions
- Package:
openclaw(npm) - Affected:
<= 2026.2.19-2 - Fixed on
main:2cdbadee1f8fcaa93302d7debbfc529e19868ea4 - Planned patched release version:
2026.2.21
Details
The fix hardens environment handling across all relevant execution paths:
- Blocks dangerous startup/runtime env keys and prefixes in shared host env sanitization.
- Sanitizes inherited ambient environment even when no per-request overrides are provided.
- Blocks dangerous config-driven env injection before values enter process environment.
- Uses the same sanitizer in macOS host execution paths.
- Aligns skill env override sanitization with the shared dangerous-env policy.
Fix Commit(s)
2cdbadee1f8fcaa93302d7debbfc529e19868ea4
Release Process Note
patched_versions is pre-set to the planned next release (2026.2.21). Once npm [email protected] is published, the advisory can be published without further field edits.
OpenClaw thanks @tdjackey for reporting.
Impact
Medium. Exploitation requires local/privileged influence over configuration or environment inputs; there is no standalone remote unauthenticated trigger from this issue alone.
Untrusted input reaches a shell command, allowing arbitrary commands to run on the host. Typical impact: code execution in the application's environment.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-W9CG-V44M-4QV8? GHSA-W9CG-V44M-4QV8 is a high-severity OS command injection vulnerability in openclaw (npm), affecting versions < 2026.2.21. It is fixed in 2026.2.21. Untrusted input reaches a shell command, allowing arbitrary commands to run on the host.
- Which versions of openclaw are affected by GHSA-W9CG-V44M-4QV8? openclaw (npm) versions < 2026.2.21 is affected.
- Is there a fix for GHSA-W9CG-V44M-4QV8? Yes. GHSA-W9CG-V44M-4QV8 is fixed in 2026.2.21. Upgrade to this version or later.
- Is GHSA-W9CG-V44M-4QV8 exploitable, and should I be worried? Whether GHSA-W9CG-V44M-4QV8 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-W9CG-V44M-4QV8 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-W9CG-V44M-4QV8? Upgrade
openclawto 2026.2.21 or later.