CVE-2026-34426 Overview
OpenClaw versions prior to commit b57b680 contain an approval bypass vulnerability due to inconsistent environment variable normalization between approval and execution paths. This authorization bypass allows attackers to inject attacker-controlled environment variables into execution without approval system validation. By exploiting differing normalization logic, attackers can discard non-portable keys during approval processing while having them accepted at execution time, bypassing operator review and potentially influencing runtime behavior including execution of attacker-controlled binaries.
Critical Impact
Attackers can bypass the approval system to inject unauthorized environment variables, potentially leading to execution of malicious binaries and compromise of runtime behavior without operator review.
Affected Products
- OpenClaw versions prior to commit b57b680c0c34de907d57f60c38fb358e82aef8f7
Discovery Timeline
- 2026-04-02 - CVE CVE-2026-34426 published to NVD
- 2026-04-02 - Last updated in NVD database
Technical Details for CVE-2026-34426
Vulnerability Analysis
This vulnerability represents a classic incomplete list of disallowed inputs issue (CWE-184) where inconsistent processing of environment variable keys between the approval and execution code paths creates a security gap. The approval system uses one normalization function while the execution path uses a different one, allowing specially crafted environment variable keys to pass through the approval process unchanged but be processed differently during execution.
The core issue lies in how the application handles environment variable normalization at two distinct points in the workflow. During the approval phase, non-portable environment variable keys are discarded through one normalization function, but during execution, a different normalization path accepts these same keys. This inconsistency creates an opportunity for attackers to submit environment variables that appear benign during approval review but carry malicious payloads that activate at runtime.
Root Cause
The root cause is the use of different normalization functions between the approval binding and execution paths. The approval system was importing normalizeEnvVarKey from host-env-security.js, while the execution path used normalizeHostOverrideEnvVarKey. This inconsistency meant that environment variable keys were processed differently depending on whether they were being validated for approval or executed, creating a gap that attackers could exploit.
Attack Vector
The attack exploits the network-accessible approval system by submitting specially crafted environment variable entries. An attacker with low privileges can craft environment variable keys that pass through the approval normalization as valid but are processed differently during execution. This allows the injection of environment variables that can influence runtime behavior, including potentially pointing to attacker-controlled binaries or modifying application behavior in unauthorized ways.
The attack requires some user interaction as it depends on an operator approving what appears to be a legitimate request. However, because the malicious payload is masked by the normalization inconsistency, even a careful reviewer may not detect the attack.
// Vulnerable code - approval binding using incorrect normalization function
// Source: https://github.com/openclaw/openclaw/commit/b57b680c0c34de907d57f60c38fb358e82aef8f7
SystemRunApprovalFileOperand,
SystemRunApprovalPlan,
} from "./exec-approvals.js";
-import { normalizeEnvVarKey } from "./host-env-security.js";
+import { normalizeHostOverrideEnvVarKey } from "./host-env-security.js";
import { normalizeNonEmptyString, normalizeStringArray } from "./system-run-normalize.js";
type NormalizedSystemRunEnvEntry = [key: string, value: string];
// Fix exports the correct normalization function for consistent use
// Source: https://github.com/openclaw/openclaw/commit/b57b680c0c34de907d57f60c38fb358e82aef8f7
return key;
}
-function normalizeHostOverrideEnvVarKey(rawKey: string): string | null {
+export function normalizeHostOverrideEnvVarKey(rawKey: string): string | null {
const key = normalizeEnvVarKey(rawKey);
if (!key) {
return null;
Detection Methods for CVE-2026-34426
Indicators of Compromise
- Unusual environment variable entries in approved system runs that contain non-standard or non-portable key formats
- Discrepancies between environment variables shown during approval and those present during execution
- Unexpected binary executions or runtime behavior changes following approved system runs
- Log entries showing environment variable normalization mismatches
Detection Strategies
- Implement logging that captures environment variables at both approval and execution stages for comparison
- Monitor for approved runs that exhibit unexpected runtime behavior or access patterns
- Create alerts for environment variable keys that contain special characters or non-portable formats
- Audit approval logs for patterns that might indicate exploitation attempts
Monitoring Recommendations
- Enable detailed logging of all environment variable processing in both approval and execution paths
- Set up alerts for any discrepancies between approved and executed environment configurations
- Monitor process execution following system runs for unexpected binary invocations
- Review approval audit trails for suspicious patterns of environment variable submissions
How to Mitigate CVE-2026-34426
Immediate Actions Required
- Update OpenClaw to commit b57b680c0c34de907d57f60c38fb358e82aef8f7 or later
- Review recent approval logs for any suspicious environment variable entries
- Audit any system runs executed prior to patching for signs of unauthorized environment variable injection
- Temporarily increase scrutiny of environment variables during the approval review process
Patch Information
The vulnerability is addressed in commit b57b680c0c34de907d57f60c38fb358e82aef8f7. The fix ensures that the normalizeHostOverrideEnvVarKey function is exported and used consistently in both the approval binding path and execution path, eliminating the normalization inconsistency. Organizations should update to this commit or any subsequent version that includes this fix. For additional details, see the GitHub Security Advisory and GitHub Pull Request #59182.
Workarounds
- Implement additional manual review steps for environment variables in the approval workflow
- Deploy custom validation scripts that normalize environment variables using consistent logic before approval
- Restrict which users can submit system runs with custom environment variables until patching is complete
- Consider temporarily disabling environment variable override functionality if business operations permit
# Update to the patched version
git fetch origin
git checkout b57b680c0c34de907d57f60c38fb358e82aef8f7
# Or pull the latest main branch that includes the fix
git pull origin main
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


