GHSA-65RX-FVH6-R4H2
Shell command injection in exec allowlist mode via unquoted heredoc expansion
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Remediación | Parche 2026.2.19 | openclaw · -2 d desde divulgación | |
| Divulgación | Publicada | GHSA-65RX-FVH6-R4H2 divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
OpenClaw's shell allowlist analyzer allowed unquoted heredoc bodies to bypass token checks. In unquoted heredocs, the shell evaluates expansion tokens such as `$(...)`, `${...}`, and backticks, which could execute unexpected commands while still passing allowlist analysis.
Deployment Scope
This issue does not affect standard/default installs.
- Default exec policy is `tools.exec.security=deny`.
- The vulnerable path requires exec to be enabled in `security=allowlist` mode.
Impact
In deployments using `security=allowlist`, an allowlisted binary invocation could carry an unquoted heredoc body that performs command/variable expansion at execution time.
Affected Packages / Versions
- Package: `openclaw` (npm)
- Latest published vulnerable version: `2026.2.19-2`
- Affected range: `<= 2026.2.19-2`
- Planned patched version: `>= 2026.2.21`
Technical Details
The parser in `src/infra/exec-approvals-analysis.ts` accepted heredoc syntax but previously skipped expansion-token enforcement for unquoted heredoc body lines. The gateway allowlist path then executed shell commands via `-c`, enabling shell expansion behavior.
Fixes now:
- track quoted/unquoted heredoc delimiters
- reject unquoted heredoc expansion tokens in body lines
- reject unterminated heredocs to avoid parser/runtime divergence
- require explicit approval for allowlisted heredoc execution on gateway hosts as additional defense-in-depth
Fix Commit(s)
- `92cada2acad80b05e3d2f89913d4a7ed5fd43499`
- `f23da067f67e81af0e6817984ec650f1712a61f8`
Release Process Note
`patched_versions` is pre-set to the planned next release (`>= 2026.2.21`). After npm release is out, publish the advisory without further content edits.
Thanks @torturado for reporting.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmopenclaw |
Corregida | 2026.2.19 | -2 d | 2026.11.3 no afectada |
2026.2.19Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/openclaw/openclaw/security/advisories/GHSA-65rx-fvh6-r4h2Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
