CVE-2026-32052: OpenClaw's system.run shell-wrapper positional argv carriers could execute hidden commands under misleading approval text
In OpenClaw up to 2026.2.23, a `system.run` call using a shell wrapper such as `/bin/sh -c` could carry extra positional arguments that ran at runtime but did not appear in the approval text. An operator could approve one command and run another. Upgrade `openclaw` to 2026.2.24.
Published Mar 3, 2026 · Updated Mar 30, 2026 · Analysis Oct 31, 2026
What an attacker can do
For shell-wrapper forms like /bin/sh -c ..., the code that binds approval text to a command looked at the inline shell payload. At runtime, though, the full argv vector was executed. Positional argv values after the inline payload, which the shell can read as $0, $1 and so on, therefore ran under approval text that omitted them. The result is an interpretation conflict (CWE-436) and incorrect authorization (CWE-863).
The attacker needs a way to get a crafted system.run request in front of an operator, so the CVSS 4.0 vector requires low privileges and active user interaction, and it rates attack complexity high. The target is the human approval step. When an AI agent proposes commands, whoever or whatever shapes that request, such as a prompt-injected agent, can hide part of the command from the person who clicks approve. The vector rates integrity and availability impact on the system as high.
The macOS companion exec host was affected as well, since it also needed display text and argv checked for consistency.
Who is affected
The openclaw npm package at or below 2026.2.23. It matters where system.run commands go through operator approval, including the macOS companion exec host. Check the version:
npm ls openclaw
openclaw --versionVersions 2026.2.24 and later contain the fix.
openclaw
- Ecosystem
- npm
- Affected
- <= 2026.2.23
- Fixed in
- 2026.2.24
- Check
npm ls openclaw
How to fix it
Upgrade to 2026.2.24:
npm install -g [email protected]The fix (commits 0f0a680d3df81739ea5088a2f88e65f938b7936b and 55cf92578d266987e390c4bf688196af98eac748) detects shell-wrapper inline-command forms that carry trailing positional argv values. It binds approval and display text to the full formatted argv. It rejects payload-only rawCommand values that do not match the execution-bound argv. It also forwards canonical display text to the macOS companion exec host, which validates rawCommand and argv consistency. The sources name no workaround.
How to tell if you were hit
Review system.run history for shell-wrapper invocations (sh -c, bash -c) that have arguments after the quoted payload, where the approval prompt showed only the payload. Compare what was approved with what ran, using process-execution logs on the host. Extra trailing arguments to a shell wrapper that the operator never saw are the sign. The sources give no fixed log string for this flaw.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
In openclaw up to and including 2026.2.23 (latest npm release as of February 25, 2026), system.run shell-wrapper inputs could present misleading approval/display text while still carrying hidden positional argv payloads that execute at runtime.
Affected Packages / Versions
- Package:
openclaw(npm) - Affected:
<= 2026.2.23 - Patched:
>= 2026.2.24(planned next release)
Root Cause
For shell-wrapper forms (for example /bin/sh -c ...), command-text binding could focus on inline shell payload text while runtime execution still used the full argv vector. Positional argv carriers after the inline payload could therefore be executed under incomplete display context.
Security Impact
Approval/display context could omit executed argv carriers, enabling hidden command execution under misleading operator-visible text.
Fix
- Detect shell-wrapper inline-command forms that carry trailing positional argv values.
- Bind approval/display command text to full formatted argv for those carrier forms.
- Reject payload-only
rawCommandvalues when they do not match the execution-bound argv context for those forms. - Forward canonical command display text to the macOS companion exec host and validate
rawCommand/argv consistency there for carrier wrappers and env-modifier shell preludes.
Verification
pnpm checkpnpm exec vitest run --config vitest.gateway.config.tspnpm test:fastpnpm vitest run src/infra/system-run-command.test.ts src/node-host/invoke-system-run.test.ts src/cli/nodes-cli.coverage.test.ts src/gateway/node-invoke-system-run-approval.test.tscd apps/macos && swift test --filter ExecSystemRunCommandValidatorTests
Fix Commit(s)
0f0a680d3df81739ea5088a2f88e65f938b7936b55cf92578d266987e390c4bf688196af98eac748
Release Process Note
patched_versions is pre-set to the planned next release (2026.2.24) so after npm publish the advisory can be published without further field 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
- Which OpenClaw version fixes CVE-2026-32052?
2026.2.24. The advisory was updated on 2026-02-25 once that release was on npm. Versions up to and including 2026.2.23 are affected.
- What is a positional argv carrier?
Extra arguments after the inline payload in a shell wrapper such as /bin/sh -c 'payload' arg0 arg1. They are part of what runs, but the old approval text showed only the payload.
- Does the macOS companion app need an update?
The fix includes the macOS companion exec host, which now validates that rawCommand and argv agree. Take the 2026.2.24 release for both.
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 entriesCVE-2026-62197
OpenClaw: Browser CDP discovery could accept blocked WebSocket URLs
medium8.5Oct 21, 2026CVE-2026-35630
OpenClaw: QQBot native approval buttons did not enforce configured approver identity
high8.0Jul 2, 2026CVE-2026-53806
OpenClaw: Combined POSIX shell options could confuse exec revalidation
high8.8Jul 2, 2026CVE-2026-53809
OpenClaw: Embedded runner policy could be confused by provider aliases
medium3.8Jul 2, 2026CVE-2026-53810
OpenClaw's marketplace runtime extension metadata could point at unscanned payloads
high8.8Jul 2, 2026CVE-2026-53811
OpenClaw: Matrix allowFrom could bind to mutable display names
high8.8Jul 2, 2026
