CVE-2026-25157
OS Command Injection in OpenClaw sshNodeCommand and SSH Target Parsing
Publication date: 2026-02-04
Last updated on: 2026-02-13
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| openclaw | openclaw | to 2026.1.29 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-78 | The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-25157 involves two related vulnerabilities in the OpenClaw macOS menubar application, specifically in its SSH remote connection handling code.
- First, the sshNodeCommand function constructs a shell script that includes an error message when a cd command fails, but it does not properly escape the user-supplied project root path. This allows an attacker to inject arbitrary shell commands that execute on the remote SSH host.
- Second, the parseSSHTarget function does not validate that SSH target strings cannot start with a dash (-). An attacker can supply a target beginning with a dash, such as -oProxyCommand=..., which SSH interprets as a configuration flag rather than a hostname, enabling arbitrary command execution on the local machine.
How can this vulnerability impact me? :
[{'type': 'paragraph', 'content': "An attacker who can influence a user's remote connection settingsβthrough social engineering or malicious configurationβcan exploit these vulnerabilities to execute arbitrary code."}, {'type': 'list_item', 'content': 'They can execute arbitrary commands on the remote SSH host by exploiting the unescaped project root path in sshNodeCommand.'}, {'type': 'list_item', 'content': 'They can also execute arbitrary commands on the local machine by supplying specially crafted SSH target strings that are interpreted as SSH configuration flags.'}, {'type': 'paragraph', 'content': 'This can lead to a full compromise of confidentiality, integrity, and availability on both local and remote systems.'}] [1]
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': 'This vulnerability involves improper escaping of user-supplied input in the sshNodeCommand function and improper validation of SSH target strings in parseSSHTarget, specifically in the macOS menubar application component of OpenClaw prior to version 2026.1.29.'}, {'type': 'paragraph', 'content': 'To detect if your system is vulnerable, first verify the OpenClaw version. Versions prior to 2026.1.29 are affected.'}, {'type': 'paragraph', 'content': 'You can check the installed OpenClaw version with a command like:'}, {'type': 'list_item', 'content': 'openclaw --version'}, {'type': 'paragraph', 'content': "To detect exploitation attempts or suspicious SSH commands, monitor SSH connection commands or logs for unusual target strings beginning with a dash (e.g., '-oProxyCommand=...'), which are not typical hostnames."}, {'type': 'paragraph', 'content': 'You might use commands such as:'}, {'type': 'list_item', 'content': "grep -E '\\s-\\w' ~/.ssh/config ~/.ssh/known_hosts"}, {'type': 'list_item', 'content': 'ps aux | grep ssh'}, {'type': 'list_item', 'content': 'Check logs for error messages involving the project root path or unexpected shell commands executed during SSH sessions.'}] [1]
What immediate steps should I take to mitigate this vulnerability?
The primary mitigation step is to upgrade OpenClaw to version 2026.1.29 or later, where this vulnerability has been patched.
Until the upgrade is applied, avoid using the macOS menubar application in Remote/SSH mode, as this is the affected component.
Additionally, be cautious about SSH target strings that begin with a dash, and avoid accepting or using untrusted project root paths or SSH configurations that could be manipulated.
Review and restrict user permissions and configurations to limit the ability of attackers to influence remote connection settings.