Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconObtain host-exec permission approval
-
DeliveryCraft build request with environment variable overrides
-
ExploitSubmit request to OpenClaw
-
InstallOpenClaw spawns build process with attacker environment variables
-
C2Build system invokes overridden compiler binary
-
ExecuteArbitrary code execution with build process privileges
-
ImpactCompromise of built artifact or host system
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V13 - Configuration Search path element control
|
| Exploitation Conditions | Exploitation requires: (1) authenticated access to an OpenClaw instance, (2) approval to submit host-exec requests (delegated capability that may be granted to external users), and (3) ability to set environment variables in the host-exec request payload. The host-env-security-policy.json must fail to block CC, CXX, CARGO_BUILD_RUSTC, or CMAKE_C_COMPILER variable overrides - specifically, these variables are not present in the allowlist or blocklist of the policy file in affected versions. This is a configuration/policy defect, not a default-off feature. The vulnerability does not require non-default setup; any OpenClaw instance with users granted host-exec permissions is vulnerable. The limiting factors are: (a) authentication is required - remote unauthenticated access does not trigger this vulnerability, and (b) the user must have been approved for host-exec permissions, which is typically a controlled delegation rather than an open capability. |
| Impact | This is a privilege escalation and code execution vulnerability with moderate real-world risk. CVSS 5.8 (AV:L/AC:L/AT:P/PR:L) indicates local vector, low complexity, but requires prior authentication and approved host-exec privileges - the AT:P (time-dependent) modifier suggests exploitation requires specific timing or conditions. The KEV status is unknown, and no public exploit has been identified, suggesting this may be a logic-design flaw rather than actively weaponized. However, the impact is significant: VI:H (high integrity) and direct RCE capability during builds mean that any organization running untrusted code through OpenClaw faces real risk if they grant host-exec permissions to users. The real-world risk depends on deployment model - if OpenClaw is used to execute third-party models or untrusted builders, the risk is HIGH; if access is tightly controlled to trusted admins only, the risk is lower. The AT:P modifier and PR:L authentication requirement are significant limiting factors that reduce the practical attack surface compared to unauthenticated network exploits. |
| Exploit ScenarioDerived | An attacker who has been granted approved host-exec permissions in OpenClaw (e.g., a contractor or third-party CI/CD user) submits a build request with environment variables set to CC=/tmp/attacker-cc and CXX=/tmp/attacker-cxx, pointing to attacker-controlled binaries. When OpenClaw executes the build process, the build system respects these environment variable overrides and invokes the attacker's binaries instead of the legitimate compiler. The attacker's binary executes arbitrary code - such as stealing credentials, injecting malware, or exfiltrating the codebase - with the privileges of the OpenClaw build process. The vulnerability requires the attacker already have host-exec approval, but once granted, the compromise is immediate and complete. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 28, 2026
OpenClaw before 2026.3.31 allows authenticated users with approved host-exec requests to execute arbitrary code during build processes by overriding compiler binary environment variables (CC, CXX, CARGO_BUILD_RUSTC, CMAKE_C_COMPILER) through an incomplete host-env-security-policy.json configuration. The vulnerability requires local access and prior authentication to an OpenClaw instance, but enables full code execution with inherited privileges during compilation. No public exploit code has been identified at time of analysis.
RemediationAI
Upgrade to OpenClaw 2026.3.31 or later. The vendor has released a patch via commit e277a37f896b5011a1df06e6490c6630074d0afa (https://github.com/openclaw/openclaw/commit/e277a37f896b5011a1df06e6490c6630074d0afa), which updates the host-env-security-policy.json to include explicit restrictions on compiler-related environment variables (CC, CXX, CARGO_BUILD_RUSTC, CMAKE_C_COMPILER). Until patching is possible, restrict approval of host-exec requests to only trusted users and implement additional environment variable filtering in any wrapper scripts that invoke OpenClaw. Audit existing host-exec permissions and revoke those granted to untrusted or semi-trusted accounts. Note that this is a policy-layer fix rather than code-level change, so patch deployment should be verified by inspecting the updated security policy file.
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
OpenClaw is a system for managing and executing untrusted workloads with restricted permissions through host-exec policies. The vulnerability stems from incomplete environment variable restrictions in the host-env-security-policy.json security policy file (CWE-427: Uncontrolled Search Path Element). The policy fails to block modification of critical compiler-invocation environment variables that determine which compiler binary is executed. When a user with approved host-exec permissions constructs a malicious request, they can inject environment variables that redirect standard compiler commands (CC, CXX, CARGO_BUILD_RUSTC, CMAKE_C_COMPILER) to attacker-controlled binaries. Because build systems invoke these environment variables without further validation, the attacker's binary executes with the privileges of the build process, achieving code execution.
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
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
Primary rating from Vendor (VulnCheck) · only source for this CVE.
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
3DescriptionCVE.org
OpenClaw before 2026.3.31 contains an incomplete host-env-security-policy.json that fails to restrict compiler binary environment variables, allowing untrusted models to substitute CC, CXX, CARGO_BUILD_RUSTC, and CMAKE_C_COMPILER via environment overrides. Attackers with approved host-exec requests can override compiler binaries to execute arbitrary code during build processes.
Blast Radius
ecosystem impact- 1 npm packages depend on openclaw (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 2026.3.31.
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
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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
EUVD-2026-26082
GHSA-g8xp-qx39-9jq9
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB