Executive brief
OpenClaw, a tool used for executing commands and managing agents, contains a security flaw in how it handles system environment variables. An attacker with basic access can inject malicious settings to redirect where the software looks for code, Docker endpoints, or security certificates. This could allow an attacker to compromise the integrity of the host system or intercept sensitive data by overriding critical configurations.
Technical details
OpenClaw suffers from insufficient environment variable sanitization (CWE-668/CWE-184) within its host execution ('exec') operations. The application fails to filter or block sensitive request-scoped environment variables related to package registries, Docker endpoints, compiler include paths, and TLS overrides (e.g., GOPRIVATE). A remote attacker with low privileges can exploit this by injecting malicious environment variables to redirect execution flows, bypass security controls, or compromise host integrity. The vulnerability is addressed in version 2026.3.31 by implementing a more robust blocklist for risky host environment overrides.
Affected products
- OpenClaw OpenClaw < 2026.3.31
Timeline
- 2026-03-31: patched: Fix committed and version 2026.3.31 released.
- 2026-03-31: advisory: GitHub Security Advisory GHSA-cg7q-fg22-4g98 published.
- 2026-04-28: disclosed: NVD publication of CVE-2026-41369.