Summary
OpenClaw tools.exec.safeBins had a stdin-only policy bypass for grep.
If pattern input was supplied through -e / --regexp, the validator consumed the pattern as a flag value and still allowed one positional operand. That positional could be a bare filename like .env.
Affected Packages / Versions
- Package:
openclaw(npm) - Latest published vulnerable version:
2026.2.19-2 - Structured vulnerable range:
<= 2026.2.19-2 - Planned fixed range for next release:
>= 2026.2.21
Exploit Preconditions
tools.exec.safeBinsmust includegrep(this is opt-in;grepis not in the default safe-bin list).- An actor must be able to invoke exec tooling under that profile.
Technical Details
src/infra/exec-safe-bin-policy.ts configured grep with maxPositional: 1 and allowed -e / --regexp value flags.
Because -e consumes the pattern in flag-value position, the remaining positional budget could be used for a file operand.
Example accepted input in vulnerable builds:
grep -e SECRET .env
That violated the intended stdin-only guarantee for safe bins.
Severity Rationale
CVSS v3.1 is set to:CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N (5.3, Medium)
AC:H is used because exploitation depends on a non-default configuration (grep must be explicitly added to safe bins) in addition to normal low-privilege tool-invocation capability.
Fix Commit(s)
c6ee14d60e4cbd6a82f9b2d74ebeb1e8ee814964
Release Process Note
patched_versions is pre-set to >= 2026.2.21 so this advisory is ready to publish after the 2026.2.21 npm release is live.
OpenClaw thanks @athuljayaram for reporting.
Impact
With grep opt-in enabled, callers could read bare-relative files from the working directory (for example .env, credentials.txt) in flows expected to be stdin-only.
CVE-2026-32022 has a CVSS score of 6.5 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2026.2.21); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-32022? CVE-2026-32022 is a medium-severity security vulnerability in openclaw (npm), affecting versions < 2026.2.21. It is fixed in 2026.2.21.
- How severe is CVE-2026-32022? CVE-2026-32022 has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of openclaw are affected by CVE-2026-32022? openclaw (npm) versions < 2026.2.21 is affected.
- Is there a fix for CVE-2026-32022? Yes. CVE-2026-32022 is fixed in 2026.2.21. Upgrade to this version or later.
- Is CVE-2026-32022 exploitable, and should I be worried? Whether CVE-2026-32022 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-32022 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-32022? Upgrade
openclawto 2026.2.21 or later.