Executive brief
OpenClaw is a build tool that executes trusted code on a host system to compile and package applications. An incomplete security policy allows untrusted code to override compiler binaries (CC, CXX, CARGO_BUILD_RUSTC, CMAKE_C_COMPILER) through environment variables, potentially redirecting compilation to malicious compilers. An attacker with access to approved host-execution requests could inject backdoors or compromise build artifacts without detection.
Technical details
The vulnerability is an incomplete implementation of the host-env-security-policy.json configuration (CWE-427: Uncontrolled Search Path Element). The policy failed to block environment variable overrides for key compiler binaries, allowing untrusted models to redirect compilation to attacker-controlled executables. The attack requires an approved host-exec request within the existing execution trust domain; it does not allow bypass of core host-execution authorization controls. The fix, released in version 2026.3.31, adds the missing compiler environment variables to the host-env security policy blocklist. Patches are available and should be applied immediately.
Affected products
- OpenClaw OpenClaw <=2026.3.28
Timeline
- 2026-03-31: disclosed
- 2026-03-30: patched: Fix commit e277a37f
- 2026-04-03: advisory: GHSA-g8xp-qx39-9jq9 published
- 2026-04-28: other: NVD published CVE-2026-41373