Description
OpenClaw before 2026.4.8 contains a remote code execution vulnerability caused by missing environment variable denylist entries for HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, and MAKEFLAGS. Attackers can inject malicious build tool environment variables to influence host exec commands and achieve arbitrary code execution.
Problem types
CWE-184: Incomplete List of Disallowed Inputs
Product status
Any version before 2026.4.8
2026.4.8 (semver)
Credits
boyhack (@boy-hack)
References
github.com/...enclaw/security/advisories/GHSA-7437-7hg8-frrw (GitHub Security Advisory (GHSA-7437-7hg8-frrw))
github.com/...ommit/d7c3210cd6f5fdfdc1beff4c9541673e814354d5 (Patch Commit)
www.vulncheck.com/...ild-tool-environment-variable-injection (VulnCheck Advisory: OpenClaw < 2026.4.8 - Remote Code Execution via Build Tool Environment Variable Injection)