Executive brief
OpenClaw is a Node.js tool that provides safe execution of shell commands with restricted access. A vulnerability in the safeBins function allows attackers with command execution access to bypass intended file access restrictions by injecting sort or grep flags, enabling arbitrary file reads or writes when only stdin input was intended to be allowed.
Technical details
The vulnerability is an input validation bypass (CWE-78, CWE-184) in OpenClaw's tools.exec.safeBins function that fails to properly neutralize dangerous command-line flags. An attacker with access to command execution flows can inject sort -o/--output flags to write to arbitrary files or grep -R flags to recursively read files, circumventing the intended stdin-only restrictions. The vulnerability requires local access and command execution privileges to exploit. The issue was patched in version 2026.2.19, with fix commit 2c05cbb43e48ebad03626d3125746fb1b9a8520f available.
Affected products
- OpenClaw OpenClaw <= 2026.2.17
Timeline
- 2026-02-19: disclosed
- 2026-02-19: patched: Version 2026.2.19 and later
- 2026-03-19: advisory