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

CVE-2026-41390: OpenClaw has a gateway exec allowlist allow-always bypass via unregistered /usr/bin/script wrapper

highCVSS 3.1 7.3GHSA-6pfc-6m7w-m8fx

OpenClaw up to 2026.3.24 did not unwrap /usr/bin/script when storing allow-always trust decisions for exec. Approving one script-wrapped command could trust the wrapper itself, which later ran a different program. Fixed in 2026.3.28.

Published Mar 31, 2026 · Updated Apr 28, 2026 · Analysis Oct 31, 2026

What an attacker can do

OpenClaw's exec approvals can remember a choice with allow-always. For wrappers like nohup, timeout and stdbuf, it unwraps the call and trusts the real target. script was not registered in that table (src/infra/dispatch-wrapper-resolution.ts). A user who approved script -q /dev/null some-program with allow-always trusted the script binary, not some-program. Later, any command routed through script matched the stored rule.

The attacker needs a way to make the agent request commands, such as prompt injection, and a user who has already granted allow-always on a wrapped command. User interaction is required. The attacker then wraps a different payload, for example a shell, in script and runs it without a fresh approval prompt. The result is local command execution with the agent's privileges, bypassing the approval step the operator relies on.

Who is affected

npm package openclaw, versions up to and including 2026.3.24, on setups that use exec approvals with the allow-always option. Check the version:

npm ls openclaw

Review your stored allow-always entries for script or other wrapper binaries.

openclaw

Ecosystem
npm
Affected
<= 2026.3.24
Fixed in
2026.3.28
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.3.28 or later:

npm install [email protected]

Commit 83da3cfe31 registers script as a dispatch wrapper and unwraps it, so approval applies to the real command. The unwrapping works on macOS and FreeBSD, where script takes the command as positional arguments. Unknown flags or no runnable target are blocked. After upgrading, clear old allow-always entries that name script.

How to tell if you were hit

Inspect the exec approvals store for allow-always entries that trust script or a similar wrapper binary. Look through command history for script invocations that launch shells or interpreters. The advisory gives no log signature. Beam records the shell commands an agent ran, so you can find wrapped commands that ran without a matching approval.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

Allow-always persistence did not unwrap /usr/bin/script and similar wrappers to the actual executed target before storing trust decisions.

Impact

A user approval for one wrapped command could persist trust for a wrapper binary that later executed a different underlying program.

Affected Component

src/infra/dispatch-wrapper-resolution.ts, src/infra/exec-wrapper-resolution.ts

Fixed Versions

  • Affected: <= 2026.3.24
  • Patched: >= 2026.3.28
  • Latest stable 2026.3.28 contains the fix.

Fix

Fixed by commit 83da3cfe31 (infra: unwrap script wrapper approval targets).

Credited to LonggTeng.

Questions

Is OpenClaw 2026.3.24 affected by CVE-2026-41390?

Yes, if you use allow-always exec approvals. Versions up to and including 2026.3.24 are affected, and 2026.3.28 fixes it.

Does it need a user action?

Yes. A user must first approve a script-wrapped command with allow-always. The vector lists user interaction as required.

Which platforms does the unwrapping cover?

The fix unwraps script on macOS and FreeBSD. On other platforms the invocation is reported as blocked instead of being trusted.

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