NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-32059: OpenClaw's tools.exec.safeBins sort long-option abbreviation bypass can skip exec approval in allowlist mode

highCVSS 4.0 8.7 · 3.1 8.8GHSA-3c6h-g97w-fg78

OpenClaw 2026.2.22-2 and earlier validated `sort` in `tools.exec.safeBins` by exact flag strings. GNU abbreviations such as `--compress-prog` slipped past the denied-flag check and ran without approval. Upgrade to openclaw 2026.2.23 if `sort` is a safe bin.

Published Mar 3, 2026 · Updated Mar 11, 2026 · Analysis Oct 31, 2026

What an attacker can do

In allowlist mode with tools.exec.ask=on-miss, commands that match a safe-bin profile run without asking the user. For sort, the profile denies dangerous flags such as --compress-program, which makes sort execute an arbitrary program. The check matched denied flags by exact string, and it accepted unknown long options that carried an inline value. GNU sort accepts unambiguous abbreviations, so --compress-prog=... reached the real binary but did not match the denied string.

An attacker, or an agent steered by a prompt injection, with low privileges can therefore run an arbitrary program through sort with no approval prompt. The program runs with the OpenClaw user's rights. The CVSS vectors rate confidentiality, integrity and availability impact as high.

It applies only when all three settings line up: tools.exec.security=allowlist, tools.exec.ask=on-miss and sort included in tools.exec.safeBins.

Who is affected

openclaw (npm) versions up to and including 2026.2.22-2, when all of these are set: tools.exec.security=allowlist, tools.exec.ask=on-miss, and tools.exec.safeBins includes sort.

npm ls openclaw

Then check your OpenClaw config for those three settings. Deployments without sort in safeBins are outside the advisory's conditions.

openclaw

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

How to fix it

Upgrade to openclaw 2026.2.23:

npm install [email protected]

The fix resolves each long option to one known flag. An exact match is used as is, a prefix is accepted only when it matches a single known flag, and ambiguous or unknown long options are rejected. The deny check then runs on the resolved flag. An inline =value on a flag that takes none is refused. It also adds --random-source, --temporary-directory and -T to the denied flags for sort. As a stopgap, remove sort from tools.exec.safeBins.

How to tell if you were hit

Search exec logs for sort invocations whose arguments include --compress-prog, --files0-fro or other long-option prefixes, and for child processes spawned by sort, which normally has none. Check for approvals that were skipped for sort commands in on-miss mode. Beam records agent shell commands and flags risky ones, so an agent running sort with a program argument shows up.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

In OpenClaw, tools.exec.safeBins validation for sort could be bypassed via GNU long-option abbreviations in allowlist mode, allowing approval-free execution paths that should require approval.

Affected Packages / Versions

  • Ecosystem: npm
  • Package: openclaw
  • Latest published version checked: 2026.2.22-2
  • Affected range: <= 2026.2.22-2
  • Fixed version: 2026.2.23

Impact

When all of the following are true:

  • tools.exec.security=allowlist
  • tools.exec.ask=on-miss
  • tools.exec.safeBins includes sort

abbreviated GNU long options (for example --compress-prog) could bypass denied-flag checks and be treated as allowlist-satisfied safe-bin usage, skipping approval.

Root Cause

Long-option handling matched denied flags by exact string and accepted unknown long options with inline values instead of failing closed.

Fix Commit(s)

  • 3b8e33037ae2e12af7beb56fcf0346f1f8cbde6f

Release Process Note

patched_versions is pre-set to the released version (2026.2.23). This advisory now reflects released fix version 2026.2.23.

OpenClaw thanks @tdjackey for reporting.

Credited to tdjackey.

Questions

Why do abbreviated flags bypass the check?

GNU tools accept unambiguous prefixes of long options. OpenClaw compared denied flags by exact string, so --compress-prog did not match --compress-program but still acted as it.

Am I affected if `sort` is not in safeBins?

The advisory's conditions require tools.exec.safeBins to include sort, with security=allowlist and ask=on-miss. Without sort listed, it does not describe exposure.

Which version fixes it?

openclaw 2026.2.23. Versions up to 2026.2.22-2 are affected.

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