Executive brief
OpenClaw, a tool used for infrastructure orchestration and command execution, contains a security flaw in how it validates environment variables during its approval process. An attacker can bypass security reviews by using specific Windows-style variable names that the approval system ignores but the execution system accepts. This allows an attacker to run commands with unauthorized settings, potentially leading to the execution of malicious software or unauthorized system changes.
Technical details
An approval bypass vulnerability exists in OpenClaw due to a discrepancy in how environment variable keys are normalized. The approval path used a strict 'portable' normalization (rejecting keys with parentheses), while the execution path used a broader Windows-compatible normalization. An attacker with low privileges can submit a request with Windows-compatible environment variables (e.g., 'ProgramFiles(x86)') that are ignored during the security hash calculation but honored during command execution. This allows the injection of unvalidated environment variables into the runtime environment, which can be used to influence application behavior or redirect execution to attacker-controlled binaries. The issue is fixed in commit b57b680 by aligning the normalization logic across both paths.
Affected products
- OpenClaw OpenClaw prior to commit b57b680
Timeline
- 2026-04-01: other: Fix authored
- 2026-04-02: patched: Fix merged into main branch
- 2026-04-02: advisory: Vulnerability disclosed and CVE assigned
References
- https://github.com/openclaw/openclaw/commit/b57b680c0c34de907d57f60c38fb358e82aef8f7
- https://github.com/openclaw/openclaw/pull/59182
- https://github.com/openclaw/openclaw/security/advisories/GHSA-98ch-45wp-ch47
- https://www.vulncheck.com/advisories/openclaw-approval-bypass-via-environment-variable-normalization