Description
OpenClaw versions prior to 2026.2.22 fail to sanitize shell startup environment variables HOME and ZDOTDIR in the system.run function, allowing attackers to bypass command allowlist protections. Remote attackers can inject malicious startup files such as .bash_profile or .zshenv to achieve arbitrary code execution before allowlist-evaluated commands are executed.
Published: 2026-03-21
Score: 7.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Patch Immediately
AI Analysis

Impact

OpenClaw versions earlier than 2026.2.22 do not sanitize the shell startup environment variables HOME and ZDOTDIR used by the system.run function. This flaw allows an attacker to inject malicious startup files such as .bash_profile or .zshenv. The injected code executes before any command allowlist checks, giving the attacker unrestricted code execution on the host where OpenClaw runs.

Affected Systems

All installations of OpenClaw running a version prior to 2026.2.22 are affected, regardless of the operating system, since the vulnerability resides in the core Node.js library. Any environment where the system.run API processes untrusted input can be impacted.

Risk and Exploitability

The vulnerability carries a CVSS score of 7.7, indicating high severity. No EPSS score is available and it is not listed in the CISA KEV catalog. The attack vector is remote, targeting the system.run API when it processes untrusted data. Successful exploitation would allow an attacker to execute arbitrary code before any allowlist-based command filtering, effectively compromising the entire system that hosts OpenClaw.

Generated by OpenCVE AI on March 21, 2026 at 07:23 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade OpenClaw to version 2026.2.22 or later to eliminate the untrusted environment variable handling issue.

Generated by OpenCVE AI on March 21, 2026 at 07:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-xgf2-vxv2-rrmg OpenClaw's shell startup env injection bypasses system.run allowlist intent (RCE class)
History

Mon, 23 Mar 2026 19:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Sat, 21 Mar 2026 05:30:00 +0000

Type Values Removed Values Added
Description OpenClaw versions prior to 2026.2.22 fail to sanitize shell startup environment variables HOME and ZDOTDIR in the system.run function, allowing attackers to bypass command allowlist protections. Remote attackers can inject malicious startup files such as .bash_profile or .zshenv to achieve arbitrary code execution before allowlist-evaluated commands are executed.
Title OpenClaw < 2026.2.22 - Remote Code Execution via Shell Startup Environment Variable Injection in system.run
First Time appeared Openclaw
Openclaw openclaw
Weaknesses CWE-78
CPEs cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:node.js:*:*
Vendors & Products Openclaw
Openclaw openclaw
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 7.7, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Openclaw Openclaw
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-03-23T18:48:41.026Z

Reserved: 2026-03-10T19:48:47.516Z

Link: CVE-2026-32056

cve-icon Vulnrichment

Updated: 2026-03-23T18:48:26.597Z

cve-icon NVD

Status : Analyzed

Published: 2026-03-21T01:17:09.103

Modified: 2026-03-23T18:59:59.843

Link: CVE-2026-32056

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-03-25T14:44:13Z

Weaknesses