Description
OpenClaw before 2026.3.31 allows workspace .env files to override the OPENCLAW_BUNDLED_HOOKS_DIR environment variable, enabling loading of attacker-controlled hook code. Attackers can replace trusted default-on bundled hooks from untrusted workspaces to execute arbitrary code.
Problem types
CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Product status
Any version before 2026.3.31
2026.3.31 (semver)
Credits
Nathan (@nexrin)
KeenSecurityLab
References
github.com/...enclaw/security/advisories/GHSA-3qpv-xf3v-mm45 (GitHub Security Advisory (GHSA-3qpv-xf3v-mm45))
github.com/...ommit/330a9f98cb29c79b1c16a2117e03d6276a0d6289 (Patch Commit)
www.vulncheck.com/...hooks-dir-environment-variable-override (VulnCheck Advisory: OpenClaw < 2026.3.31 - Arbitrary Hook Code Execution via OPENCLAW_BUNDLED_HOOKS_DIR Environment Variable Override)