CVE-2026-53822: OpenClaw: TOCTOU command injection bypasses allowlist
HIGHOpenClaw contains a time-of-check-time-of-use (TOCTOU) race condition (CWE-367) in its shell wrapper that lets authenticated network attackers swap command arguments after allowlist approval but before execution, completely invalidating the platform's primary command security control. With a CVSS of 8.8 and full confidentiality, integrity, and availability impact — and no user interaction required — any AI agent deployment running a pre-2026.5.18 version is exposed to arbitrary code execution on the agent host, where elevated tool permissions typically translate directly to lateral movement and data exfiltration. No public exploit or CISA KEV entry exists yet, but TOCTOU exploitation is well-understood and the low-privilege requirement substantially lowers the bar; the 175 prior CVEs logged against this package signal a pattern of persistent security debt that warrants treating this urgently. Patch to OpenClaw 2026.5.18 immediately; if patching is delayed, restrict network access to agent execution endpoints, disable shell wrapper invocation where feasible, and audit process spawn logs for argv anomalies.
What is the risk?
HIGH. The CVSS 8.8 score reflects a network-accessible, low-complexity attack requiring only low privileges and no user interaction — a combination that places this firmly in opportunistic exploitation territory once a proof-of-concept circulates. The AI agent context amplifies risk substantially: OpenClaw agents commonly hold elevated permissions to interact with filesystems, external APIs, and infrastructure services, meaning post-exploitation blast radius extends well beyond the initial process boundary. Critically, the allowlist bypass nature of this flaw undermines a control that security teams likely treated as a hard boundary, creating a false assurance problem. The 175 prior CVEs in the same package suggest systemic security debt rather than an isolated defect.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| OpenClaw | pip | — | No patch |
Do you use OpenClaw? You're affected.
How severe is it?
What is the attack surface?
What should I do?
5 steps-
PATCH
Upgrade to OpenClaw 2026.5.18 or later immediately — this is the only complete fix.
-
WORKAROUND (if patching is delayed): Restrict submission of commands to OpenClaw agents to the minimum necessary principals; disable shell wrapper execution capabilities where not strictly required.
-
DETECTION
Monitor for unexpected child process spawns from OpenClaw agent processes that don't match known-good allowlisted command patterns; enable auditd or equivalent to capture argv at exec time for post-hoc review.
-
NETWORK
Limit network exposure of OpenClaw agent endpoints to trusted internal segments — the AV:N attack vector means internet-exposed instances are especially at risk.
-
AUDIT
Review all OpenClaw-integrated workflows and assume allowlist controls may have been bypassable since before 2026.5.18 — treat any command audit logs from that window as potentially unreliable.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-53822?
OpenClaw contains a time-of-check-time-of-use (TOCTOU) race condition (CWE-367) in its shell wrapper that lets authenticated network attackers swap command arguments after allowlist approval but before execution, completely invalidating the platform's primary command security control. With a CVSS of 8.8 and full confidentiality, integrity, and availability impact — and no user interaction required — any AI agent deployment running a pre-2026.5.18 version is exposed to arbitrary code execution on the agent host, where elevated tool permissions typically translate directly to lateral movement and data exfiltration. No public exploit or CISA KEV entry exists yet, but TOCTOU exploitation is well-understood and the low-privilege requirement substantially lowers the bar; the 175 prior CVEs logged against this package signal a pattern of persistent security debt that warrants treating this urgently. Patch to OpenClaw 2026.5.18 immediately; if patching is delayed, restrict network access to agent execution endpoints, disable shell wrapper invocation where feasible, and audit process spawn logs for argv anomalies.
Is CVE-2026-53822 actively exploited?
No confirmed active exploitation of CVE-2026-53822 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-53822?
1. PATCH: Upgrade to OpenClaw 2026.5.18 or later immediately — this is the only complete fix. 2. WORKAROUND (if patching is delayed): Restrict submission of commands to OpenClaw agents to the minimum necessary principals; disable shell wrapper execution capabilities where not strictly required. 3. DETECTION: Monitor for unexpected child process spawns from OpenClaw agent processes that don't match known-good allowlisted command patterns; enable auditd or equivalent to capture argv at exec time for post-hoc review. 4. NETWORK: Limit network exposure of OpenClaw agent endpoints to trusted internal segments — the AV:N attack vector means internet-exposed instances are especially at risk. 5. AUDIT: Review all OpenClaw-integrated workflows and assume allowlist controls may have been bypassable since before 2026.5.18 — treat any command audit logs from that window as potentially unreliable.
What systems are affected by CVE-2026-53822?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, AI-automated DevOps pipelines, tool-use orchestration systems, model serving with agent integration.
What is the CVSS score for CVE-2026-53822?
CVE-2026-53822 has a CVSS v3.1 base score of 8.8 (HIGH).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0049 Exploit Public-Facing Application AML.T0050 Command and Scripting Interpreter AML.T0053 AI Agent Tool Invocation AML.T0107 Exploitation for Defense Evasion Compliance Controls Affected
What are the technical details?
Original Advisory
OpenClaw before 2026.5.18 contains a command injection vulnerability where shell wrapper argv could change between approval and execution. Attackers can rebuild command arguments after allowlist approval to execute unapproved command shapes, potentially bypassing security controls.
Exploitation Scenario
An attacker with low-privilege access to an organization's AI agent platform submits a benign, allowlist-approved command to an OpenClaw agent. Exploiting the TOCTOU race window between the allowlist check and the actual execve call, the attacker modifies the argv array in-process — substituting the approved command with a malicious payload such as a reverse shell or a credential-harvesting script targeting API keys stored in the agent's environment. Because the allowlist validation already completed successfully, the substituted command executes with the agent's full permissions. In environments where OpenClaw agents are integrated into automated pipelines with access to cloud credentials, model weights, training datasets, or downstream infrastructure, this translates to a full host compromise that can pivot to broader organizational infrastructure within minutes.
Weaknesses (CWE)
CWE-367 — Time-of-check Time-of-use (TOCTOU) Race Condition: The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.
- [Implementation] The most basic advice for TOCTOU vulnerabilities is to not perform a check before the use. This does not resolve the underlying issue of the execution of a function on a resource whose state and identity cannot be assured, but it does help to limit the false sense of security given by the check.
- [Implementation] When the file being altered is owned by the current user and group, set the effective gid and uid to that of the current user and group when executing this statement.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H References
Timeline
Related Vulnerabilities
CVE-2026-30741 9.8 OpenClaw: RCE via request-side prompt injection
Same package: openclaw CVE-2026-28451 9.3 OpenClaw: SSRF via Feishu extension exposes internal services
Same package: openclaw GHSA-cwj3-vqpp-pmxr 8.8 openclaw: Model bypasses authz to persist unsafe config
Same package: openclaw CVE-2026-35674 8.8 OpenClaw: scope bypass enables full agent admin takeover
Same package: openclaw CVE-2026-53811 8.8 OpenClaw: privilege escalation via identity spoofing
Same package: openclaw