OpenClaw unauthenticated local RCE via WebSocket config.apply
OpenClaw versions before 2026.1.20 contained an unauthenticated local remote code execution vulnerability in the WebSocket API's config.apply function, allowing arbitrary command execution as the gateway user through unsafe cliPath values.
What happened
An unauthenticated local client could use the Gateway WebSocket API to write config via config.apply and set unsafe cliPath values that were later used for command discovery, enabling command injection as the gateway user.
config.apply accepted raw JSON and wrote it to disk after schema validation, but cliPath values were not constrained to safe executable names or paths. Command discovery used a shell invocation when resolving executables.
Reported impact
A local process on the same machine could execute arbitrary commands as the gateway process user.
Governance controls
The vulnerability was addressed in patched version 2026.1.20 and later. If immediate upgrade was not possible, mitigation included setting gateway.auth and avoiding custom cliPath values.
Classification
Sources and evidence
Sources not yet published
This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.