Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to OpenClaw system
-
DeliverySet malicious HOME or ZDOTDIR environment variables
-
ExploitCreate .bash_profile or .zshenv with arbitrary commands
-
ExecutionTrigger system.run function
-
ImpactExecute injected code before allowlist validation
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires authenticated access to OpenClaw versions prior to 2026.2.22. Attacker must have low-privilege user credentials and ability to control HOME or ZDOTDIR environment variables before invoking system.run function. Victim interaction not required. Exploits unsanitized shell startup files (.bash_profile, .zshenv) to bypass command allowlist. |
| Impact | This vulnerability presents moderate to high real-world risk with a CVSS score of 7.5. The CVSS vector CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H indicates network-based exploitation with high attack complexity requiring low privileges and no user interaction, enabling complete compromise of confidentiality, integrity, and availability. The high attack complexity (AC:H) suggests exploitation requires specific conditions such as access to vulnerable system.run invocations with attacker-controlled inputs, which somewhat limits the attack surface. The vulnerability enables complete arbitrary code execution before allowlist validation, making it particularly dangerous in environments where OpenClaw is used to provide restricted command execution capabilities. The availability of a vendor patch and the existence of detailed advisories from VulnCheck and GitHub Security Advisories indicate this is a confirmed, actively tracked vulnerability that should be prioritized for patching, especially in internet-facing deployments or multi-tenant environments where low-privilege users could escalate privileges. |
| Exploit ScenarioDerived | An authenticated attacker with low-level privileges gains network access to an OpenClaw instance and identifies functionality that invokes the vulnerable system.run function. The attacker crafts a request that sets the HOME environment variable to point to an attacker-controlled directory (potentially a web-accessible or shared filesystem location) containing a malicious .bash_profile file with reverse shell code. When system.run spawns a shell process, the shell reads and executes the attacker's startup file before any allowlisted command runs, granting the attacker arbitrary code execution with the privileges of the OpenClaw process, effectively bypassing all command restrictions. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 21, 2026
OpenClaw versions prior to 2026.2.22 contain a shell environment variable injection vulnerability in the system.run function that allows attackers to bypass command allowlist protections. Authenticated remote attackers with low privileges can inject malicious shell startup files (.bash_profile, .zshenv) via unsanitized HOME and ZDOTDIR variables to achieve arbitrary code execution before allowlisted commands execute. A patch is available from the vendor via GitHub commit c2c7114ed39a547ab6276e1e933029b9530ee906.
RemediationAI
Upgrade OpenClaw to version 2026.2.22 or later, which contains the fix for environment variable sanitization in the system.run function (see patch at https://github.com/openclaw/openclaw/commit/c2c7114ed39a547ab6276e1e933029b9530ee906 and security advisory at https://github.com/openclaw/openclaw/security/advisories/GHSA-xgf2-vxv2-rrmg). Until patching is complete, implement compensating controls such as restricting network access to OpenClaw instances to trusted IP ranges only, limiting user privileges to minimize the pool of potential attackers who meet the PR:L requirement, and if possible, avoiding the system.run function entirely or implementing additional input validation that blocks manipulation of HOME and ZDOTDIR variables. Review logs for suspicious environment variable manipulation attempts targeting shell startup file paths.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability affects OpenClaw (cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:*:*:*), specifically the system.run function which executes shell commands. This is a classic CWE-78 (Improper Neutralization of Special Elements used in an OS Command) vulnerability where shell environment variables HOME and ZDOTDIR are not sanitized before spawning shell processes. Unix shells read configuration files from paths specified by these variables during startup, executing any code within them before the actual command runs. By controlling these variables, attackers can point the shell to attacker-controlled directories containing malicious .bash_profile, .bashrc, .zshenv, or similar startup files, effectively bypassing any command allowlist checks that only examine the command string itself.
Know when Openclaw gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
3DescriptionCVE.org
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.
Executive ViewAI
OpenClaw systems running versions prior to 2026.2.22 are vulnerable to privilege escalation attacks where authenticated users can execute arbitrary code by manipulating shell environment variables. This affects any organization using OpenClaw for critical infrastructure, application deployment, or system automation, potentially compromising system integrity and data security.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Related Vulnerabilities in OpenClaw Multiple Authorization and Command Execution
View all 20Auth bypass in OpenClaw voice-call extension before 2026.2.1. EPSS 0.68%. PoC and patch available.
Privilege escalation in OpenClaw (pre-2026.3.28) allows unauthenticated remote attackers to gain administrative access b
OpenClaw versions 2026.2.22 through 2026.2.24 contain a privilege escalation vulnerability that allows authenticated att
OpenClaw versions prior to 2026.1.29 automatically establish WebSocket connections to attacker-controlled gateway URLs e
Path traversal in OpenClaw through version 2026.3.23 enables unauthenticated remote attackers to read arbitrary files in
Directory-context bypass in OpenClaw before 2026.8.1 allows authenticated attackers with user interaction to reuse an 'a
OpenClaw versions 2026.1.30 and below fail to validate Telegram webhook secret tokens when `channels.telegram.webhookSec
EUVD-2026-13958
GHSA-rj39-33v7-9xrq
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB