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

CVE-2026-29608: OpenClaw's Node system.run approval hardening wrapper semantic drift can execute unintended local scripts

mediumCVSS 3.1 6.7GHSA-h3rm-6x7g-882f

OpenClaw 2026.3.1 rewrote the argv of wrapped commands in node system.run approval hardening, so a command approved as `echo SAFE` could run a local script named sh from the approved working directory instead. Only 2026.3.1 is affected. Upgrade the npm package openclaw to 2026.3.2.

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

What an attacker can do

The cause is in src/node-host/invoke-system-run-plan.ts. The hardening replaced argv[0] with the resolved executable. Wrapper resolution unwrapped dispatch wrappers, so an input of env, sh, -c, 'echo SAFE' resolved to sh. The approved plan became /bin/sh, sh, -c, 'echo SAFE', while the approval text stayed echo SAFE.

That changes the meaning. /bin/sh treats the extra sh as the script to run, so it runs ./sh in the approved cwd and ignores the displayed payload.

The approval screen and the executed behavior can differ in the host=node flow. The advisory lists two preconditions: the attacker can influence wrapper argv and place a local file in the approved working directory, and the operator approves the displayed command. An attacker who can write into a project directory the agent works in, such as through a cloned repo, could use this. The script runs with the permissions of the node host. CVSS 3.1 reflects this with local access, high complexity and required user interaction.

Who is affected

npm package openclaw, exactly version 2026.3.1. The data marks the vulnerable range as = 2026.3.1, so earlier versions are not listed. Check:

npm ls openclaw

openclaw

Ecosystem
npm
Affected
= 2026.3.1
Fixed in
2026.3.2
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.3.2 (fix commit dded569626b0d8e7bdab10b5e7528b6caf73a0f1).

npm install [email protected]

The advisory lists no workaround. Until you upgrade, do not approve wrapped commands in directories that contain files you do not trust.

How to tell if you were hit

Look for files named sh, or other names matching the wrapped shell, in working directories where node system.run commands were approved. Compare approved command text with the process that actually ran: a /bin/sh process whose arguments start with sh -c and whose script is a file in the cwd is a sign. Beam records agent shell commands and tool calls, which can show what ran after an approval.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

In [email protected], node system.run approval-path hardening rewrote wrapper command argv in a way that changed execution semantics. A command shown/approved as a shell payload (for example echo SAFE) could execute a different local script when wrapper argv were rewritten.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Affected: 2026.3.1 (latest published npm version as of March 2, 2026)
  • Fixed release: 2026.3.2 (released)

Technical Details

Root cause was in node-host approval hardening for system.run:

  • src/node-host/invoke-system-run-plan.ts rewrote argv[0] to the resolved executable.
  • Wrapper resolution unwrapped dispatch wrappers, so input like ['env','sh','-c','echo SAFE'] resolved executable sh.
  • The approved plan could become ['/bin/sh','sh','-c','echo SAFE'] while approval text remained echo SAFE.

That rewrite changed runtime behavior: /bin/sh interprets the extra sh positional argument as a script path, enabling execution of a local ./sh file from approved cwd instead of the approved payload text.

Impact

Approval-integrity break in host=node execution flow: operator-visible command text and executed behavior could diverge.

Exploit preconditions:

  • attacker can influence wrapper argv and place a local file in approved working directory,
  • operator grants approval for the displayed command.

Fix Commit(s)

  • dded569626b0d8e7bdab10b5e7528b6caf73a0f1

Fixed Version

Credited to tdjackey.

Questions

Is OpenClaw 2026.3.0 affected by CVE-2026-29608?

The advisory lists only 2026.3.1 as affected, because the faulty approval hardening shipped in that release. The fixed release is 2026.3.2.

Does the operator need to approve something?

Yes. The operator approves the displayed command, for example echo SAFE, and a different local script then runs.

What file does the attacker need?

A local file named sh in the approved working directory, plus influence over the wrapper argv.

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