Openclaw
CVE-2026-32003
MEDIUM
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. |
| Impact | The CVSS 3.1 base score of 6.6 (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H) reflects moderate-to-high severity with important contextual constraints. The attack vector is network-accessible, but attack complexity is high and privileges required are high—meaning the attacker must already have authenticated access with elevated credentials. The impact is severe (high confidentiality, integrity, and availability loss), indicating complete system compromise once exploitation succeeds. No KEV or EPSS data is provided in the intelligence, limiting probability assessment; however, the requirement for high privileges significantly reduces real-world exploitation scope compared to unauthenticated RCE vulnerabilities. The existence of a GitHub security advisory and commit fix indicates vendor acknowledgment and active remediation. This is a legitimate priority for organizations running OpenClaw with multi-tenant or untrusted administrator access, but poses lower risk in single-tenant deployments with trusted admin bases. The technical exploit is non-trivial (high AC) and non-automatable without prior privilege escalation. |
| Exploit ScenarioDerived | An attacker with high-privilege authenticated access (e.g., a malicious administrator or compromised service account) invokes the system.run function with a seemingly innocuous allowlisted command (e.g., 'ls -la') but injects a crafted PS4 environment variable containing arbitrary shell commands. When the system.run function executes the command through bash, the PS4 variable is expanded during xtrace initialization, causing the injected commands to execute with the same privileges as the system.run process—bypassing the command allowlist entirely. This allows the attacker to read sensitive files, modify system configuration, or establish persistence on the host. Proof-of-concept code and exploitation techniques would likely be documented in the VulnCheck advisory at https://www.vulncheck.com/advisories/openclaw-remote-code-execution-via-shellopts-ps4-environment-injection-in-system-run. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 19, 2026
OpenClaw versions before 2026.2.22 allow high-privileged attackers to execute arbitrary shell commands by injecting malicious environment variables into the system.run function, bypassing the intended command allowlist protections. By exploiting bash xtrace expansion through SHELLOPTS and PS4 variables, an attacker with request-scoped environment variable access can achieve code execution beyond the restricted command set. No patch is currently available for this command injection vulnerability.
Earlier versions of this analysis (1)
OpenClaw versions prior to 2026.2.22 contain an environment variable injection vulnerability in the system.run function that allows authenticated attackers with high privileges to bypass command allowlist restrictions and execute arbitrary shell commands. By manipulating SHELLOPTS and PS4 environment variables, an attacker can leverage bash xtrace expansion to inject commands outside the intended allowlisted command body, achieving remote code execution on Linux systems. The vulnerability requires high-privilege access and manual invocation but results in complete command injection capability once triggered.
RemediationAI
Immediately upgrade OpenClaw to version 2026.2.22 or later to apply the security patch. See the vendor security advisory at https://github.com/openclaw/openclaw/security/advisories/GHSA-2fgq-7j6h-9rm4 for verification of patched versions. Until patching is completed, implement network-level access controls to restrict authenticated user access to the system.run function to trusted administrator accounts only, and consider running OpenClaw in a restricted container environment with minimal environment variable propagation. Additionally, audit environment variables being passed to system.run invocations in application logs to detect potential exploit attempts using SHELLOPTS or PS4 injection patterns. Disabling bash xtrace mode system-wide can further mitigate exploitation but is not a substitute for patching.
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 resides in OpenClaw's system.run function, which implements a command allowlist mechanism intended to restrict which shell commands can be executed. However, the implementation fails to sanitize environment variables passed in request scope, specifically SHELLOPTS and PS4—bash-specific environment variables that control shell behavior and debugging output respectively. CWE-78 (Improper Neutralization of Special Elements used in an OS Command) categorizes this as an OS command injection flaw. When bash xtrace mode (set -x) is enabled via PS4 or SHELLOPTS, bash expands the PS4 variable before executing commands, allowing attackers to inject arbitrary code that executes outside the allowlist validation layer. The attack leverages bash's internal expansion semantics to circumvent the security boundary intended by the allowlist mechanism.
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:H/UI:N/S:U/C:H/I:H/A:H
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
2DescriptionCVE.org
OpenClaw versions prior to 2026.2.22 contain an environment variable injection vulnerability in the system.run function that allows attackers to bypass command allowlist restrictions via SHELLOPTS and PS4 environment variables. An attacker who can invoke system.run with request-scoped environment variables can execute arbitrary shell commands outside the intended allowlisted command body through bash xtrace expansion.
Executive ViewAI
CVE-2026-32003 presents notable security risk, a OS command injection vulnerability rated CVSS 6.6. Exploitation could allow attackers to execute code or inject malicious input. Organizations should apply vendor updates when available and monitor for exploitation.
Apply vendor patch. If patching is delayed: deploy WAF rules, restrict network access, enable logging.
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.
Affected Products (CPE)CVE.org
Auth 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
An authorization mismatch vulnerability in OpenClaw versions prior to 2026.3.1 allows authenticated users with operator.
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
Authentication bypass in OpenClaw before 2026.5.3 allows remote attackers with low privileges to receive agent responses
Directory-context bypass in OpenClaw before 2026.8.1 allows authenticated attackers with user interaction to reuse an 'a
Unauthenticated access to the noVNC observer interface in OpenClaw's Docker sandbox browser allows anyone who can reach
Authentication bypass in OpenClaw's MCP loopback interface allows local low-privilege attackers to escalate to owner-lev
OpenClaw versions before 2026.2.26 allow authenticated attackers to write arbitrary files outside the workspace director
OpenClaw versions prior to 2026.2.22 contain a shell environment variable injection vulnerability in the system.run func
GHSA-2fgq-7j6h-9rm4
NVD
CVE.org
EPSS
VulDB
Exploit-DB