Описание
OpenClaw has incomplete Fix for CVE-2026-27486: Unvalidated SIGKILL in !stop Chat Command via shell-utils.ts
Fixed in OpenClaw 2026.3.24, the current shipping release.
Advisory Details
Title: Incomplete Fix for CVE-2026-27486: Unvalidated SIGKILL in !stop Chat Command via shell-utils.ts
Description:
Summary
The !stop (and /bash stop) chat command kills background bash processes using SIGKILL directly, without first sending SIGTERM to allow graceful shutdown. This is because bash-command.ts imports killProcessTree() from src/agents/shell-utils.ts, which still contains the pre-CVE-2026-27486 aggressive kill logic, rather than from the patched src/process/kill-tree.ts.
Details
CVE-2026-27486 fixed unsafe process termination by introducing a graceful shutdown sequence in src/process/kill-tree.ts — sending SIGTERM first, waiting a configurable grace period (default 3 seconds), then escalating to SIGKILL only if the process is still alive.
However, an identical copy of the unpatched killProcessTree function remains in src/agents/shell-utils.ts (lines 170–192). This function sends SIGKILL immediately with no SIGTERM:
The !stop chat command handler in src/auto-reply/reply/bash-command.ts imports and calls this vulnerable version at line 302:
Compare this to the patched version in src/process/kill-tree.ts:
PoC
This PoC demonstrates the difference between the vulnerable and patched code paths inside a running OpenClaw Gateway container.
Setup:
Exploit (vulnerable killProcessTree from shell-utils.ts):
The following script is injected into the container and executed. It starts a bash process that traps SIGTERM for graceful shutdown, then kills it using the same code path as !stop:
Run:
Log of Evidence
Exploit output (SIGKILL only, no graceful shutdown):
Control output (SIGTERM first, graceful shutdown works):
Impact
When !stop is used, background processes are killed instantly via SIGKILL with no chance to perform cleanup. This can result in:
- Data corruption: processes writing to files or databases are interrupted mid-write
- Resource leaks: temporary files, lock files, and network connections are not properly released
- Security-sensitive cleanup skipped: operations like erasing in-memory secrets or completing audit logs are bypassed
This is the same class of impact that CVE-2026-27486 was filed for — the fix simply missed the shell-utils.ts copy of the function.
Affected products
- Ecosystem: npm
- Package name: openclaw
- Affected versions: <= 2026.3.14
- Patched versions:
Severity
- Severity: Medium
- Vector string: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H
Weaknesses
- CWE: CWE-404: Improper Resource Shutdown or Release
Occurrences
| Permalink | Description |
|---|---|
| https://github.com/moltbot/moltbot/blob/f2849c2417/src/agents/shell-utils.ts#L170-L192 | The vulnerable killProcessTree function that sends immediate SIGKILL without SIGTERM. |
| https://github.com/moltbot/moltbot/blob/f2849c2417/src/auto-reply/reply/bash-command.ts#L5 | Import statement pulling the vulnerable killProcessTree from shell-utils.ts instead of the patched kill-tree.ts. |
| https://github.com/moltbot/moltbot/blob/f2849c2417/src/auto-reply/reply/bash-command.ts#L300-L304 | The !stop handler calling the vulnerable killProcessTree(pid). |
| https://github.com/moltbot/moltbot/blob/f2849c2417/src/process/kill-tree.ts#L46-L78 | The patched killProcessTreeUnix with graceful SIGTERM → grace period → SIGKILL sequence (for reference). |
Пакеты
openclaw
< 2026.3.24
2026.3.24
Связанные уязвимости
OpenClaw before 2026.3.24 contains an incomplete fix for CVE-2026-27486 where the !stop chat command uses an unpatched killProcessTree function from shell-utils.ts that sends SIGKILL immediately without graceful SIGTERM shutdown. Attackers can trigger process termination via the !stop command, causing data corruption, resource leaks, and skipped security-sensitive cleanup operations.