{"id":"CVE-2026-32022","aliases":["CVE-2026-32022","GHSA-3xfw-4pmr-4xc5"],"related":[],"kind":"vulnerability","state":"published","title":"OpenClaw < 2026.2.21 - Arbitrary File Read via grep -e Flag Policy Bypass","summary":"OpenClaw versions prior to 2026.2.21 contain a stdin-only policy bypass vulnerability in the grep tool within tools.exec.safeBins that allows attackers to read arbitrary files by supplying a pattern via the -e flag parameter. Attackers can include a positional filename operand to bypass file access restrictions and read sensitive files.env from the working directory.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"OpenClaw versions prior to 2026.2.21 contain a stdin-only policy bypass vulnerability in the grep tool within tools.exec.safeBins that allows attackers to read arbitrary files by supplying a pattern via the -e flag parameter. Attackers can include a positional filename operand to bypass file access restrictions and read sensitive files.env from the working directory.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nOpenClaw `tools.exec.safeBins` had a stdin-only policy bypass for `grep`.\nIf 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`.\n\n### Affected Packages / Versions\n\n- Package: `openclaw` (npm)\n- Latest published vulnerable version: `2026.2.19-2`\n- Structured vulnerable range: `<= 2026.2.19-2`\n- Planned fixed range for next release: `>= 2026.2.21`\n\n### Exploit Preconditions\n\n- `tools.exec.safeBins` must include `grep` (this is opt-in; `grep` is not in the default safe-bin list).\n- An actor must be able to invoke exec tooling under that profile.\n\n### Technical Details\n\n`src/infra/exec-safe-bin-policy.ts` configured `grep` with `maxPositional: 1` and allowed `-e` / `--regexp` value flags.\nBecause `-e` consumes the pattern in flag-value position, the remaining positional budget could be used for a file operand.\nExample accepted input in vulnerable builds:\n\n```bash\ngrep -e SECRET .env\n```\n\nThat violated the intended stdin-only guarantee for safe bins.\n\n### Impact\n\nWith `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.\n\n### Severity Rationale\n\nCVSS v3.1 is set to:\n`CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N` (5.3, Medium)\n\n`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.\n\n### Fix Commit(s)\n\n- `c6ee14d60e4cbd6a82f9b2d74ebeb1e8ee814964`\n\n### Release Process Note\n\n`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.\n\nOpenClaw thanks @athuljayaram for reporting.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las versiones de OpenClaw anteriores a la 2026.2.21 contienen una vulnerabilidad de omisión de política solo para stdin en la herramienta grep dentro de tools.exec.safeBins que permite a los atacantes leer archivos arbitrarios al proporcionar un patrón a través del parámetro de la bandera -e. Los atacantes pueden incluir un operando de nombre de archivo posicional para eludir las restricciones de acceso a archivos y leer archivos sensibles .env del directorio de trabajo.","source":"nvd"}],"published":"2026-03-03T19:09:20.000Z","modified":"2026-06-23T16:14:41.384Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":6,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":6,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-184"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"2026.2.21","status":"affected"},{"type":"semver","version":"2026.2.21","status":"unaffected"}],"vendor":"OpenClaw","product":"OpenClaw","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2026.2.21"}],"ecosystem":"npm","package":"openclaw","purl":"pkg:npm/openclaw","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2026.2.21"}],"vendor":"openclaw","product":"openclaw","cpe":"cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/openclaw/openclaw/security/advisories/GHSA-3xfw-4pmr-4xc5","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/openclaw/openclaw/commit/c6ee14d60e4cbd6a82f9b2d74ebeb1e8ee814964","tags":["patch","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/openclaw-arbitrary-file-read-via-grep-e-flag-policy-bypass","tags":["third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32022","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/openclaw/openclaw","tags":["package"],"sources":["ghsa"]}],"credits":["Athul Jayaram (@athuljayaram)"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-03-21T03:17:45.435Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-32022","url":"https://www.cve.org/CVERecord?id=CVE-2026-32022","licence":"CVE Terms of Use","modified":"2026-06-23T16:14:41.384Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3xfw-4pmr-4xc5","url":"https://github.com/advisories/GHSA-3xfw-4pmr-4xc5","licence":"CC-BY-4.0","modified":"2026-06-08T23:30:20.270Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-32022","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32022","licence":"Public domain","modified":"2026-06-17T10:34:57.490Z"}],"updatedAt":"2026-11-25T22:59:16.207Z","epss":{"score":0.00303,"percentile":0.24875,"date":"2026-12-02T12:00:21.000Z"}}