OpenClaw's Node system.run approval hardening wrapper semantic drift can execute unintended local scripts

Description

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

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-03-03 21:19:08 UTC
Updated
2026-03-19 21:22:06 UTC
GitHub reviewed
2026-03-03 21:19:08 UTC

EPSS Score

Score Percentile
0.02% 4.86%

CVSS Scores

Base score Version Severity Vector
6.7 3.1
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.

Identifiers

CWEs

CWE id Name
CWE-88 Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Credits

  • tdjackey (reporter)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm openclaw = 2026.3.1 2026.3.2

References

cvelogic Threat Intelligence