/

CVE-2026-32023

Severity:

HIGH RISK

(7.1)

Authorization Logic Bypass in OpenClaw system.run Allowlist

CVE-2026-32023

Modified

Vulnerability type

Category:

Authorization Logic Bypass

CWE:

CWE-863

Impact:

Privilege Abuse Through Policy Bypass

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenClaw versions prior to 2026.2.24 contain an approval gating bypass in system.run allowlist mode, where nested transparent dispatch wrappers can evade shell-wrapper detection.

By chaining wrapper binaries such as /usr/bin/env, an attacker may execute /bin/sh -c commands without triggering the expected approval prompt in allowlist plus ask=on-miss configurations.

Affected context

This vulnerability appears in environments that use OpenClaw's system.run with:

  • Allowlist-based command control enabled
  • ask=on-miss interactive approval for non-allowlisted commands
  • Shell or command execution pathways that rely on wrapper detection for policy enforcement

It primarily affects deployments where approval prompts are relied upon to gate access to shell commands or sensitive tooling, and where dispatch helpers like /usr/bin/env or other transparent wrappers are available on the path.

Exploit preconditions

  • Attack surface: Interfaces or workflows that invoke OpenClaw system.run with allowlist plus ask=on-miss enforcement (e.g., orchestration jobs, automation hooks, CI/CD tasks, or operator tooling).
  • Required access: Ability to submit or influence the command line executed through system.run (such as configuration changes, job specifications, or script contents).
  • Trigger point: Execution of commands wrapped via a chain of transparent dispatch helpers (e.g., /usr/bin/env) that ultimately invoke /bin/sh -c or equivalent shell interpreters.
  • Why exploitation is possible: The authorization logic evaluates only the outermost or a limited subset of wrappers, failing to correctly classify nested dispatchers as shell wrappers. As a result, the final shell execution path is not recognized as requiring approval, allowing the shell to run without an approval prompt.

Why this happens

The underlying issue is an authorization logic flaw in how OpenClaw classifies and inspects commands under system.run allowlist mode.

The implementation assumes that identifying shell-wrapper binaries at the top level is sufficient to decide whether a command should be allowed or gated. Nested or chained dispatch wrappers (such as /usr/bin/env) are treated as benign, and the evaluation does not consistently resolve through these layers to the ultimate shell interpreter (e.g., /bin/sh -c).

This maps to CWE-863: Incorrect Authorization, where the system performs an access control decision based on incomplete or overly narrow analysis of the action. The policy engine authorizes or skips approval prompts for commands that, after wrapper resolution, violate the intended security policy, enabling execution of shell commands that should have been gated.

Potential impact

  • Attackers could launch interactive or scripted shells via /bin/sh -c without triggering the expected approval prompt.
  • Users may bypass operational review or change-management controls enforced via ask=on-miss, increasing the risk of unsafe or untracked actions.
  • Automation tasks with limited command allowlists could be coerced into running arbitrary shell commands beyond their intended scope.
  • Defensive assumptions about who can execute certain shell-based tooling or maintenance commands may no longer hold, potentially facilitating lateral movement or privilege abuse within the environment.

General mitigation guidance

Effective mitigation focuses on hardening authorization logic and reducing reliance on shallow command classification:

  • Ensure command evaluation walks through wrapper and dispatch chains to determine the actual target executable (e.g., resolving /usr/bin/env and similar helpers until the effective binary is identified).
  • Treat known dispatch utilities (env, nohup, chpst, setsid, and similar wrappers) as transparent layers for policy purposes, applying the same controls as if the underlying shell or tool were invoked directly.
  • Prefer explicit, tightly scoped allowlists for executables and disallow generic shells (/bin/sh, /bin/bash, /usr/bin/python -c, etc.) where possible, especially in automation or CI/CD contexts.
  • Configure policies to treat invocations that use -c or equivalent "execute command string" flags as high risk, regardless of wrapper usage.
  • Apply least-privilege principles to the accounts and roles that can define or modify commands passed into system.run, limiting the ability to introduce new wrapper chains.
  • Consider adding a conservative "deny by default on nested wrappers" fallback mode in high-sensitivity environments, so that unexpected wrapper depth triggers a block or at least a mandatory approval.

How teams detect issues like this

Detection approaches can concentrate on policy evaluation paths, command patterns, and configuration drift:

  • Use static or configuration analysis to identify OpenClaw system.run usages that:
  • Allow wrapper utilities (e.g., /usr/bin/env) while intending to deny or gate shells.
  • Permit -c style argument patterns or generic interpreter entry points.
  • During code review, flag patterns where:
  • Security relies solely on top-level binary names without considering wrapper chains.
  • Assumptions are made that env or other dispatch helpers are "safe" while shells are blocked.
  • Introduce runtime logging and policy audit trails that capture:
  • The fully resolved command chain (each wrapper and the final executable).
  • Whether an approval prompt was expected vs. actually triggered.
  • Employ automated review tools or policy-as-code frameworks that can:
  • Model the effective command after wrapper resolution.
  • Enforce organizational rules (e.g., all shell invocations must be logged and approved).
  • Periodically simulate or test commands that use common dispatch wrappers in staging environments to validate that policy enforcement behaves as intended.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/57c9a18180c8b14885bbd95474cbb17ff2d03f0b
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-ccg8-46r6-9qgj
vulncheck.comvulncheck.com/advisories/openclaw-approval-gating-bypass-via-dispatch-wrapper-depth-cap-mismatch-in-system-run

Frequently asked

questions

It can be, depending on how OpenClaw is integrated. If external users or services can influence commands passed to system.run (for example via APIs, job specifications, or CI/CD pipelines), they may be able to exploit the bypass without local shell access.

The attacker needs the ability to define or modify commands that OpenClaw executes under system.run with allowlist plus ask=on-miss mode. This could come from permissions to edit configuration, job definitions, scripts, or automation workflows that invoke system.run.

The safest pattern is to correct the authorization logic so that shell detection and approval gating operate on the fully resolved command, including nested wrappers. Treat dispatch helpers as transparent and ensure that any effective shell or interpreter invocation is evaluated against the same policy and approval requirements as direct shell execution.

Future prevention should emphasize robust policy evaluation and least privilege: model authorization based on the actual operation performed, not just surface-level command names; maintain strict allowlists; avoid permitting generic shells or interpreters in automated paths; and incorporate policy-as-code checks and review into CI/CD so that wrapper-based bypasses are caught during design and implementation rather than in production.

Find out what's already
exploitable in your codebase.