CVE-2026-25157
Unknown Unknown - Not Provided
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
OpenClaw is a personal AI assistant. Prior to version 2026.1.29, there is an OS command injection vulnerability via the Project Root Path in sshNodeCommand. The sshNodeCommand function constructed a shell script without properly escaping the user-supplied project path in an error message. When the cd command failed, the unescaped path was interpolated directly into an echo statement, allowing arbitrary command execution on the remote SSH host. The parseSSHTarget function did not validate that SSH target strings could not begin with a dash. An attacker-supplied target like -oProxyCommand=... would be interpreted as an SSH configuration flag rather than a hostname, allowing arbitrary command execution on the local machine. This issue has been patched in version 2026.1.29.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-04
Last Modified
2026-02-13
Generated
2026-05-06
AI Q&A
2026-02-04
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
openclaw openclaw to 2026.1.29 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
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.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart