AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-32023: OpenClaw's dispatch-wrapper depth-cap mismatch can bypass shell-wrapper approval gating in system.run allowlist mode

mediumCVSS 4.0 6.9 · 3.1 8.8GHSA-ccg8-46r6-9qgj

OpenClaw up to 2026.2.23 can run a shell without the operator's approval prompt when system.run is chained through nested wrapper commands deeper than a fixed depth cap. It needs security=allowlist with ask=on-miss and an authenticated gateway caller. Fixed in 2026.2.24. It is an approval-boundary bypass, not unauthenticated code execution.

Published Mar 3, 2026 · Updated Mar 30, 2026 · Analysis Nov 7, 2026

What an attacker can do

In system.run, unwrapping of dispatch wrappers stops at a depth cap named MAX_DISPATCH_WRAPPER_DEPTH. Once the cap is reached, shell-wrapper detection reports no wrapper, so the sh -c form goes unrecognized. Allowlist resolution still matches the partly unwrapped argv, which starts with /usr/bin/env. A chain of nested transparent wrappers, for example repeated /usr/bin/env, can therefore run /bin/sh -c ... with no approval prompt. The weaknesses are CWE-284 and CWE-863.

The server must be in security=allowlist with ask=on-miss, and the caller must reach system.run, which means an authenticated gateway caller. OpenClaw's trust model treats such callers as trusted operators, so the advisory triages this as moderate.

The practical danger is the agent case: a prompt-injected agent can build the long chain and get shell execution that the operator expected to approve by hand.

Who is affected

The npm package openclaw up to and including 2026.2.23. Check the version.

npm ls openclaw

Check that your exec settings use security=allowlist with ask=on-miss; those are the configurations the advisory describes.

openclaw

Ecosystem
npm
Affected
<= 2026.2.23
Fixed in
2026.2.24
Check
npm ls openclaw

How to fix it

Upgrade to OpenClaw 2026.2.24 or later. The fix is commit 57c9a181, with regression tests for depth-overflow wrapper chains at both the resolution and the system.run layers. After the fix, the proof-of-concept request is denied with SYSTEM_RUN_DENIED: approval required. The advisory lists no workaround.

How to tell if you were hit

Look in exec logs for system.run requests with long chains of /usr/bin/env or similar wrappers that end in /bin/sh -c. Shell processes started with no matching approval event are a sign. Beam records agent shell commands, and its rules can flag nested shell invocations.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

A wrapper-depth parsing mismatch in system.run allowed nested transparent dispatch wrappers (for example repeated /usr/bin/env) to suppress shell-wrapper detection while still matching allowlist resolution. In security=allowlist + ask=on-miss, this could bypass the expected approval prompt for shell execution.

Severity / Trust Model

OpenClaw’s documented model treats authenticated gateway callers as trusted operators and exec approvals as operator guardrails. This issue is still a real approval-boundary bypass and is triaged as Medium in that model.

Technical Details

  • Dispatch-wrapper unwrapping stopped at MAX_DISPATCH_WRAPPER_DEPTH.
  • Shell-wrapper extraction could return non-wrapper once depth was exhausted.
  • Allowlist resolution could still succeed on partially unwrapped argv beginning with /usr/bin/env.
  • Result: nested wrapper chains could execute /bin/sh -c ... without fresh approval in allowlist + ask=on-miss.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Latest published version at triage time: 2026.2.23
  • Vulnerable versions: <= 2026.2.23
  • Patched versions (planned next release): >= 2026.2.24

Fix Commit(s)

  • 57c9a18180c8b14885bbd95474cbb17ff2d03f0b

Verification

  • Added regression coverage for depth-overflow wrapper chains at resolution and system.run invocation layers.
  • Reproduced previous PoC behavior before fix, then confirmed denial after fix with SYSTEM_RUN_DENIED: approval required.

Release Process Note

patched_versions is pre-set to the planned next release (2026.2.24) so once npm publish is complete, advisory publication can proceed without additional version edits.

OpenClaw thanks @tdjackey for reporting.

Publication Update (2026-02-25)

[email protected] is published on npm and contains the fix commit(s) listed above. This advisory now marks >= 2026.2.24 as patched.

Credited to tdjackey.

Questions

Is CVE-2026-32023 remotely exploitable without credentials?

No. The caller must be an authenticated gateway caller who can reach system.run.

Which settings are required?

security=allowlist and ask=on-miss, plus a wrapper chain deeper than the depth cap.

How do I confirm the fix?

On 2026.2.24 or later, the overflow-chain request is denied with SYSTEM_RUN_DENIED: approval required.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More OpenClaw vulnerabilities

All OpenClaw entries