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

CVE-2026-28463: OpenClaw exec approvals: safeBins could bypass stdin-only constraints via shell expansion

highCVSS 4.0 8.6 · 3.1 5.7GHSA-xvhf-x56f-2hpp

OpenClaw's exec-approvals allowlist checks "safe bins" such as `head`, `tail` and `grep` before expansion, but then runs them through `sh -c`, which expands globs and variables. A caller or prompt injection could read arbitrary local files without triggering approval. It needs host execution in allowlist mode. Versions up to 2026.2.13 are affected. Upgrade to 2026.2.14.

Published Feb 18, 2026 · Updated Mar 6, 2026 · Analysis Oct 31, 2026

What an attacker can do

Safe bins are meant to be stdin-only: no file arguments. The allowlist validation inspected the argv tokens as typed. Execution then used a real shell, which expanded * or $HOME/... into file paths. A command like grep secret * passed the check as a harmless token but read every file in the working directory (CWE-78).

The affected configuration is tools.exec.host=gateway or node with security=allowlist. The default tools.exec.host is sandbox, so default setups are not exercised. The attacker is an authorized but untrusted caller, or prompt injection steering the agent. The result is disclosure of any file the gateway or node process can read, such as keys, tokens and .env files, without an approval prompt.

The two CVSS vectors differ a lot. The 4.0 vector is local with high impact, 8.6. The 3.1 vector needs low privileges and user interaction and scores 5.7 with confidentiality only. The advisory describes file disclosure, not command execution.

Who is affected

The npm package openclaw at 2026.2.13 or earlier, when tools.exec.host is gateway or node and security is allowlist. Check both:

npm ls -g openclaw
grep -nE 'host|security|safeBins' ~/.openclaw/openclaw.json

The config path may differ in your install. With the default sandbox host, the advisory says the issue is not exercised.

openclaw

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

How to fix it

Upgrade to 2026.2.14, the patched version (commit 77b8971):

npm install -g [email protected]

When the allowlist is satisfied only through safe bins, buildSafeShellCommand wraps each argv token in single quotes at execution time. Globs and $VARS stay literal, pipes and &&, ||, ; chaining are kept, and embedded quotes are escaped. The advisory lists no other workaround. Leaving tools.exec.host at sandbox avoids the affected configuration.

How to tell if you were hit

Review exec logs and approval history for safe-bin commands (head, tail, grep) whose arguments hold *, ?, $HOME or other $VAR text. Those commands should have needed approval and did not. The original command is kept for display and logging, so check there. Beam records agent shell commands and file access, and its rules flag risky ones. That is a second place to spot a safe bin used to read secret files.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

OpenClaw's exec-approvals allowlist supports a small set of "safe bins" intended to be stdin-only (no positional file arguments) when running tools.exec.host=gateway|node with security=allowlist.

In affected configurations, the allowlist validation checked pre-expansion argv tokens, but execution used a real shell (sh -c) which expands globs and environment variables. This allowed safe bins like head, tail, or grep to read arbitrary local files via tokens such as * or $HOME/... without triggering approvals.

This issue is configuration-dependent and is not exercised by default settings (default tools.exec.host is sandbox).

Affected Packages / Versions

  • Package: openclaw (npm)
  • Affected: <= 2026.2.13
  • Patched: >= 2026.2.14 (planned; publish the advisory after the npm release is out)

Impact

An authorized but untrusted caller (or prompt-injection) could cause the gateway/node process to disclose files readable by that process when host execution is enabled in allowlist mode.

Fix

Safe-bins executions now force argv tokens to be treated as literal text at execution time (single-quoted), preventing globbing and $VARS expansion from turning "safe" tokens into file paths.

Fix Commit(s)

  • 77b89719d5b7e271f48b6f49e334a8b991468c3b

Release Process Note

patched_versions is pre-set for the next planned release (>= 2026.2.14) so publishing is a single click once that npm version is available.

Thanks @christos-eth for reporting.

Credited to christos-eth.

Questions

Is the default OpenClaw setup affected by CVE-2026-28463?

No. It is configuration-dependent. The default tools.exec.host is sandbox, which does not exercise the issue. Host execution in allowlist mode does.

What can an attacker read?

Files readable by the gateway or node process, by passing tokens like * or $HOME/... to a safe bin such as head, tail or grep.

Which version fixes it?

2026.2.14. Safe-bin arguments are now single-quoted so the shell treats them as literal text.

Can prompt injection trigger it?

Yes, per the advisory. An authorized but untrusted caller or prompt injection can cause the disclosure when host execution is enabled in allowlist mode.

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