Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local environment access (PR:L)
-
DeliverySet HGRCPATH/RUSTC_WRAPPER/MAKEFLAGS to malicious payload
-
ExploitTrigger OpenClaw build or exec operation
-
ExecutionEnv vars bypass denylist filter
-
PersistMalicious build tool config or binary executes
-
ImpactArbitrary code runs as local user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Exploitation requires all of the following: (1) local access - AV:L in the CVSS 4.0 vector confirms this is not remotely exploitable; (2) the ability to set one or more of HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, or MAKEFLAGS in the environment visible to the OpenClaw process (PR:L); (3) OpenClaw must subsequently invoke an exec or build operation that passes the unfiltered environment to a child process such as Mercurial, Cargo, or Make. The advisory explicitly states OpenClaw is a user-controlled local assistant scoped to a single-user trust model - not a multi-tenant service - which materially limits the attacker population. Exploitation is further constrained by AC:H: the attacker must both control the relevant env vars and trigger the specific build invocation path. Remote unauthenticated exploitation is not possible. |
| Impact | The CVSS 4.0 vector (AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:H/VA:N) scores 5.8, reflecting a local, high-complexity attack path with low privilege requirements and significant integrity impact. EPSS is extremely low at 0.03% (8th percentile), SSVC confirms exploitation status as none with automatable set to no, and no KEV listing exists - all signals converge on low current exploitation probability. The apparent tension between the 'RCE' label and the medium CVSS score is consistent and expected: the attack is locally constrained, not remotely exploitable, making real-world blast radius far smaller than a remote RCE. The advisory explicitly scopes risk to OpenClaw's user-controlled local assistant trust model and does not assume a multi-tenant service boundary, which significantly limits the realistic attacker population to scenarios involving compromised developer environments, malicious project-level dotfiles, or poisoned CI runner environments. SSVC Technical Impact being partial aligns with VC:L/VI:H and no availability or subsequent-system impact - integrity can be fully compromised for the user's session, but broader system-wide or network-wide impact is not indicated. |
| Exploit ScenarioDerived | An attacker with control over a developer's local shell environment - via a compromised dotfile, a malicious project-level .env, or environment injection in a CI runner - sets CARGO_BUILD_RUSTC_WRAPPER to point to a malicious binary. When the developer subsequently invokes OpenClaw and triggers a Rust build operation, OpenClaw passes the unfiltered environment to the child process, causing the malicious wrapper binary to execute with the developer's local privileges. No public exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 24, 2026
Remote code execution in OpenClaw (npm) before version 2026.4.8 is achievable by injecting malicious build tool environment variables - specifically HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, and MAKEFLAGS - which were absent from the application's exec environment denylist. Because OpenClaw is a user-controlled local assistant, an attacker with the ability to set environment variables on the host can influence exec commands invoked by the tool and achieve arbitrary code execution. No public exploit code has been identified at time of analysis, and SSVC signals indicate no current exploitation activity, but the integrity impact (VI:H) is significant when exploitation conditions are met.
RemediationAI
Upgrade the OpenClaw npm package to version 2026.4.8 or later, which adds HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, and MAKEFLAGS to the exec environment denylist. The vendor-confirmed fix is at commit d7c3210cd6f5fdfdc1beff4c9541673e814354d5 (https://github.com/openclaw/openclaw/commit/d7c3210cd6f5fdfdc1beff4c9541673e814354d5), re-verified against main before publication with targeted regression tests per the GHSA advisory. If immediate upgrade is not feasible, unset these four environment variables in the shell session before invoking OpenClaw (e.g., unset HGRCPATH CARGO_BUILD_RUSTC_WRAPPER RUSTC_WRAPPER MAKEFLAGS) - note this will break legitimate Mercurial, Cargo, and Make workflows for the duration of the session. A stronger compensating control is launching OpenClaw with a clean environment (env -i plus explicit re-export of needed variables), but this requires careful enumeration of dependencies and may disrupt tool integrations.
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 an npm-distributed local AI coding assistant (CPE: cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:*:*:*). The vulnerability class is CWE-184 (Incomplete List of Disallowed Inputs): the application maintains a denylist of environment variables filtered before passing the environment to child processes or exec calls. Four security-sensitive build tool variables - HGRCPATH (Mercurial config path override), CARGO_BUILD_RUSTC_WRAPPER and RUSTC_WRAPPER (Rust/Cargo compiler wrapper redirects), and MAKEFLAGS (GNU Make flag injection) - were absent from this denylist. These variables are natively respected by their respective build tools and can redirect compilation steps to execute attacker-controlled binaries or load attacker-controlled configurations, injecting code into the host build execution context. The vulnerability class is related to GHSA-cm8v-2vh9-cxf3, indicating a known and recurring pattern of environment variable injection against developer tooling.
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:H/AT:N/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
Local vector with high complexity; low privilege suffices; scope changes as injected env vars hijack child build tool processes outside OpenClaw's own security context.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
3DescriptionCVE.org
OpenClaw before 2026.4.8 contains a remote code execution vulnerability caused by missing environment variable denylist entries for HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, and MAKEFLAGS. Attackers can inject malicious build tool environment variables to influence host exec commands and achieve arbitrary code execution.
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-26129
GHSA-7437-7hg8-frrw
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB