Description
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.
Published: 2026-04-28
Score: 5.8 Medium
EPSS: n/a
KEV: No
Impact: Remote Code Execution
Action: Patch
AI Analysis

Impact

A missing environment variable denylist in OpenClaw before 2026.4.8 allows an attacker to inject malicious build‑tool environment variables such as HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, and MAKEFLAGS into host execution commands, enabling arbitrary code execution on the host machine that runs the builder.

Affected Systems

OpenClaw deployments using any version older than 2026.4.8, regardless of operating system, are affected when the software runs unfiltered build scripts that may set the listed environment variables.

Risk and Exploitability

The CVSS score of 5.8 indicates a moderate severity. The EPSS score is not available, so exploitation probability cannot be quantified, but the vulnerability is not yet listed in CISA KEV. Attackers can potentially introduce malicious variables through remote build interfaces or compromised build scripts, giving them the ability to execute arbitrary host commands. Successful exploitation would provide full control over the build host.

Generated by OpenCVE AI on April 28, 2026 at 22:54 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade OpenClaw to version 2026.4.8 or later to apply the vendor patch that introduces the environment variable denylist.
  • Add explicit denylist entries for HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, and MAKEFLAGS in the OpenClaw configuration so that attempts to inject these variables are ignored before host commands are executed.
  • Restrict environmental variable assignments from untrusted build scripts by running OpenClaw under a limited user account and unsetting the vulnerable variables in the build environment before execution.

Generated by OpenCVE AI on April 28, 2026 at 22:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 28 Apr 2026 19:15:00 +0000

Type Values Removed Values Added
Description 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.
Title OpenClaw < 2026.4.8 - Remote Code Execution via Build Tool Environment Variable Injection
First Time appeared Openclaw
Openclaw openclaw
Weaknesses CWE-184
CPEs cpe:2.3:a:openclaw:openclaw:*:*:*:*:*:node.js:*:*
Vendors & Products Openclaw
Openclaw openclaw
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 5.8, 'vector': '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'}


Subscriptions

Openclaw Openclaw
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-04-28T18:10:16.722Z

Reserved: 2026-04-27T11:38:59.195Z

Link: CVE-2026-42427

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-04-28T19:37:46.493

Modified: 2026-04-28T20:10:23.367

Link: CVE-2026-42427

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-28T23:00:13Z

Weaknesses