Description
OpenClaw versions prior to 2026.2.19 tools.exec.safeBins contains an input validation bypass vulnerability that allows attackers to execute unintended filesystem operations through sort output flags or recursive grep flags. Attackers with command execution access can leverage sort -o flag for arbitrary file writes or grep -R flag for recursive file reads, circumventing intended stdin-only restrictions.
Problem types
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (CWE-78)
Product status
Any version before 2026.2.19
2026.2.19 (semver)
Credits
nedlir
References
github.com/...enclaw/security/advisories/GHSA-4685-c5cp-vp95 (GitHub Security Advisory (GHSA-4685-c5cp-vp95))
github.com/...ommit/2c05cbb43e48ebad03626d3125746fb1b9a8520f (Patch Commit)
www.vulncheck.com/...ia-sort-output-and-recursive-grep-flags (VulnCheck Advisory: OpenClaw < 2026.2.19 - safeBins stdin-only bypass via sort output and recursive grep flags)