Openclaw cli: OpenClaw Improperly Neutralizes Line Breaks in systemd Unit Generation Enables Local Command Execution (Linux) (CVE-2026-32063)
Description
OpenClaw CLI contains a local command injection vulnerability in its systemd unit file generation on Linux. The vulnerability arises because attacker-controlled environment variable values are not properly sanitized for newline characters, allowing injection of additional systemd directives. When the service is restarted, these injected directives execute arbitrary commands with the privileges of the OpenClaw gateway service user. This affects Linux deployments using systemd user services where an attacker can influence the environment variables and trigger service reinstall or install. A fix for this vulnerability is available.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-32063 is a command injection vulnerability in OpenClaw CLI's Linux systemd unit generation path. The vulnerability occurs because the function rendering `Environment=` entries does not reject carriage return or line feed characters in environment keys or values. Additionally, the `systemdEscapeArg()` function uses an incorrect regex that fails to detect whitespace properly, allowing newline injection to break out of the `Environment=` line and inject standalone systemd directives such as `ExecStartPre=`. Upon service restart, systemd executes the injected commands, resulting in local arbitrary command execution under the gateway service user. Exploitation requires attacker control over `config.env.vars` and the ability to trigger service install or reinstall and restart.
Potential Impact
An attacker with local access who can influence environment variables in OpenClaw's configuration can inject arbitrary systemd directives into the user service unit file. This leads to local command execution with the privileges of the OpenClaw gateway service user upon service restart. The vulnerability does not require elevated privileges to exploit but does require the ability to modify configuration and trigger service reinstall and restart. There is no indication of remote exploitation or privilege escalation beyond the gateway service user.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade OpenClaw CLI to version 2026.7.1 or later where the issue is fixed. Until patched, avoid allowing untrusted input in environment variables used in systemd unit generation and avoid triggering service reinstall or restart with such inputs. Follow vendor guidance for applying the fix.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-openclaw-cli-CVE-2026-32063
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6ac245b812601ec6a3166bcd
Added to database: 10/04/2026, 12:25:28 UTC
Last enriched: 10/04/2026, 13:01:36 UTC
Last updated: 10/04/2026, 16:08:37 UTC
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.