CVE-2026-25157

OpenClaw/Clawdbot has OS Command Injection via Project Root Path in sshNodeCommand

Published Feb 4, 2026 CVSS 3.1 · 7.8 High EPSS 1.1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

OpenClaw, a personal AI assistant, was found to allow malicious actors to execute arbitrary shell commands on the SSH host when interacting with the sshNodeCommand function. The weakness stemmed from building a shell script that interpolated the user‑supplied Project Root Path directly into an echo statement in an error message without proper escaping. Likewise, the parseSSHTarget function accepted SSH target strings beginning with a dash, allowing an attacker to inject SSH configuration flags such as –oProxyCommand that would be interpreted as command‑line options rather than a hostname. Consequently, an attacker could run arbitrary commands on the remote machine or even the local machine. This vulnerability is classified as a severe OS Command Injection flaw (CWE‑78).

Affected Systems

The affected product is OpenClaw as distributed by the vendor openclaw. All releases prior to version 2026.1.29 are vulnerable. The problem exists in the Node.js implementation of OpenClaw and does not depend on the operating system; however, the vulnerability is reported to affect macOS platforms as well due to the reliance on SSH utilities. Users should verify that they are running a patched version after 2026.1.29.

Risk and Exploitability

The CVSS score for this flaw is 7.8, indicating high severity, while the EPSS score is below 1%, suggesting low current exploit probability. The vulnerability is not listed in the CISA KEV catalog, implying that no widespread exploitation has been formally identified to date. Nevertheless, the flaw permits remote code execution through both a server‑side command injection vector and a client‑side SSH configuration injection vector, meaning that any user with the ability to specify a project path or SSH target string could potentially compromise the target machine if these inputs are not validated.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade OpenClaw to version 2026.1.29 or later to apply the OS command injection fix.
  • Validate or sanitize the Project Root Path value before incorporating it into shell commands.
  • Reject SSH target strings that begin with a dash or enforce explicit hostname validation to prevent unintended SSH configuration flags.

Generated by OpenCVE AI on April 18, 2026 at 13:45 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-q284-4pvr-m585 OpenClaw/Clawdbot has OS Command Injection via Project Root Path in sshNodeCommand
History
Type Values Removed Values Added
First Time appeared Apple
Apple macos
CPEs cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:node.js:*:*
cpe:2.3:o:apple:macos:-:*:*:*:*:*:*:*
Vendors & Products Apple
Apple macos
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Openclaw
Openclaw openclaw
Vendors & Products Openclaw
Openclaw openclaw
Type Values Removed Values Added
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.
Title OpenClaw/Clawdbot has OS Command Injection via Project Root Path in sshNodeCommand
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 5, 2026, 2:32 PM
Reserved
Jan 29, 2026, 3:39 PM
Status
Analyzed
Published
Feb 4, 2026, 8:16 PM
Modified
Jun 17, 2026, 10:24 AM