Executive brief
OpenClaw is an AI automation platform that allows execution of system commands in a controlled manner. The safeBins feature restricts commands to stdin-only input, but a vulnerability allows attackers with command execution access to bypass this restriction using sort's output flags (e.g., `-o`) or grep's recursive flags (`-R`) to perform unintended file writes or reads on the system. This could lead to unauthorized data access or system file modification.
Technical details
The vulnerability is an input validation bypass (CWE-184, CWE-78) in OpenClaw's tools.exec.safeBins mechanism, which is intended to restrict command execution to stdin-only operations. The flaw allows attackers to supply command-line flags to sort (e.g., `-o filename` or `--output filename`) or grep (e.g., `-R`) that bypass the stdin-only restriction. With these flags, an attacker can perform arbitrary filesystem writes via sort's output redirection or recursive filesystem reads via grep's recursive search. The vulnerability requires command execution access within a deployment that has enabled tools.exec.safeBins. Fix is available in version 2026.2.19 and later (commit 2c05cbb).
Affected products
- OpenClaw openclaw <= 2026.2.17
Timeline
- 2026-02-19: disclosed: GHSA-4685-c5cp-vp95 published
- 2026-02-19: patched: Version 2026.2.19 released with fix
- 2026-02-19: advisory: GitHub Security Advisory GHSA-4685-c5cp-vp95 issued
References
- https://github.com/openclaw/openclaw/security/advisories/GHSA-4685-c5cp-vp95
- https://github.com/openclaw/openclaw/commit/2c05cbb43e48ebad03626d3125746fb1b9a8520f
- https://github.com/openclaw/openclaw
- https://www.vulncheck.com/advisories/openclaw-safebins-stdin-only-bypass-via-sort-output-and-recursive-grep-flags