Openclaw cli: OpenClaw: HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, and MAKEFLAGS missing from exec env denylist — RCE via build tool env injection (GHSA-cm8v-2vh9-cxf3 class) (CVE-2026-42427)
Description
OpenClaw CLI versions before 2026.4.8 have a vulnerability where certain build tool environment variables (HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, and MAKEFLAGS) were missing from the execution environment denylist. This omission allows hostile environment variables to influence host execution commands, leading to potential remote code execution (RCE). The issue is fixed in version 2026.4.8.
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 package prior to version 2026.4.8 did not include HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, and MAKEFLAGS in its execution environment denylist. This allowed malicious build-tool environment variables to affect host execution commands, resulting in a remote code execution vulnerability classified under GHSA-cm8v-2vh9-cxf3. The vulnerability was addressed and fixed in commit d7c3210cd6f5fdfdc1beff4c9541673e814354d5 and released in version 2026.4.8.
Potential Impact
An attacker who can influence the build environment variables can execute arbitrary code on the host system due to the missing denylist entries. This compromises the security boundary of the OpenClaw CLI, potentially allowing full control over the affected system within the scope of the OpenClaw trust model.
Mitigation Recommendations
Upgrade to OpenClaw CLI version 2026.4.8 or later, which includes the fix for this vulnerability. The patch has been verified with regression tests. No additional mitigation is required once the update is applied.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-openclaw-cli-CVE-2026-42427
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6ac2459812601ec6a3165d3c
Added to database: 10/04/2026, 12:24:56 UTC
Last enriched: 10/04/2026, 12:43:47 UTC
Last updated: 10/04/2026, 16:08:38 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.
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.