CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-7437-7HG8-FRRW

GHSA-7437-7HG8-FRRW: Remote Code Execution via Build Tool Environment Injection in OpenClaw

Alon Barad
Alon Barad
Software Engineer

Apr 9, 2026·6 min read·34 visits

Executive Summary (TL;DR)

Unauthenticated Remote Code Execution in OpenClaw via environment variable injection into build tools like cargo and make. Fixed in version 2026.4.7-1.

OpenClaw versions prior to 2026.4.7 are vulnerable to Remote Code Execution (RCE) due to improper neutralization of environment variables during the execution of external build tools. By manipulating variables such as `RUSTC_WRAPPER` or `MAKEFLAGS`, an attacker can hijack the execution flow of child processes to run arbitrary commands.

Vulnerability Overview

OpenClaw exposes functionality that involves spawning external processes for project management, plugin builds, and dependency resolution. This architecture requires the application to construct execution environments for downstream tools dynamically. The vulnerability arises within this environment construction phase, where externally influenced input is not adequately sanitized before being passed to child processes.

The core issue is classified under CWE-77 (Command Injection) and CWE-78 (OS Command Injection). OpenClaw utilizes an execution environment denylist to filter out sensitive or dangerous variables prior to spawning child processes. This implementation was incomplete and failed to account for several critical environment variables utilized by common system tools.

Specifically, the variables HGRCPATH, CARGO_BUILD_RUSTC_WRAPPER, RUSTC_WRAPPER, and MAKEFLAGS were omitted from the internal execution denylist. By controlling the values of these variables, an unauthenticated attacker can subvert the intended execution flow of external binaries such as cargo, rustc, or GNU make. This subversion directly leads to arbitrary code execution within the context of the OpenClaw service.

Root Cause Analysis

When OpenClaw initiates a task requiring external process execution, it calls internal functions that utilize native operating system APIs like spawn or exec. During this initiation, the application attempts to isolate the child process by cloning the current environment and stripping variables known to be dangerous. This mechanism relies on a predefined array of restricted keys to govern the sanitization process.

The vulnerability exists because tools like Rust's package manager (cargo) and GNU make support specialized environment variables that dictate their operational behavior. RUSTC_WRAPPER and CARGO_BUILD_RUSTC_WRAPPER instruct cargo to execute a specified program instead of the standard Rust compiler. HGRCPATH directs Mercurial to load configuration files from arbitrary locations, which can include malicious hook definitions designed to execute shell commands.

When an attacker successfully injects one of these unhandled variables into the OpenClaw environment map, the sanitization routine ignores it. The child process subsequently inherits the poisoned environment. Upon execution, the downstream tool parses the variable and executes the attacker-defined binary or script instead of performing its intended compilation or linking function.

Code Analysis

The flaw resides in the execution environment handler located within src/infra/exec/. Prior to version 2026.4.7-1, the internal EXEC_ENV_DENYLIST array lacked entries for several build-tool-specific variables. The remediation strategy involved updating this array to explicitly block the identified attack vectors during process initialization.

The security update, implemented in commit d7c3210cd6f5fdfdc1beff4c9541673e814354d5, expands the denylist coverage. The patch modifies the environment preparation logic to iterate over an expanded set of restricted keys, ensuring they are purged from the memory map before the process is spawned.

// Vulnerable Implementation Concept
const EXEC_ENV_DENYLIST: &[&str] = &["LD_PRELOAD", "LD_LIBRARY_PATH", "PATH"];
 
// Patched Implementation Concept
const EXEC_ENV_DENYLIST: &[&str] = &[
    "LD_PRELOAD",
    "LD_LIBRARY_PATH",
    "PATH",
    "RUSTC_WRAPPER",
    "CARGO_BUILD_RUSTC_WRAPPER",
    "MAKEFLAGS",
    "HGRCPATH"
];

While the addition of these variables prevents this specific exploitation route, the reliance on a denylist approach maintains a structural risk. Future updates to downstream tools may introduce new environment variable directives. A robust long-term fix requires transitioning the architecture to an explicit allowlist of permitted environment variables.

Exploitation Methodology

Exploitation requires the attacker to possess a mechanism for injecting arbitrary environment variables into OpenClaw's execution context. This is typically achieved by supplying a crafted project metadata file or configuration payload that OpenClaw parses during initialization. The application subsequently maps these parsed values into the execution environment of spawned child processes.

The attacker constructs a payload targeting one of the omitted variables, such as setting RUSTC_WRAPPER to a file path like /tmp/exploit.sh. The attacker must ensure the target script exists on the filesystem or provide a payload that stages the script prior to triggering the vulnerable code path. Once the malicious environment variable is staged, the attacker triggers an action within OpenClaw that invokes the targeted external tool.

Initiating a plugin build or updating dependencies causes OpenClaw to spawn cargo build. The execution environment inherits the RUSTC_WRAPPER directive. Cargo processes this directive and executes the attacker's script in place of the legitimate rust compiler.

Impact Assessment

The vulnerability carries a CVSS v3.1 base score of 9.8 (Critical). Successful exploitation grants the attacker arbitrary code execution with the identical privilege level as the OpenClaw service process. This fundamentally compromises the confidentiality, integrity, and availability of the host operating system.

The attack vector does not require prior authentication or elevated privileges, rendering the vulnerability highly exploitable by remote actors. An attacker only needs network access to the OpenClaw management interface or the ability to submit project configuration files to the service pipeline.

Post-exploitation capabilities depend on the deployment architecture. OpenClaw instances operating under the root user or a high-privileged system account allow the attacker to gain full administrative control over the host. This facilitates lateral movement within the network infrastructure, deployment of persistent backdoors, and exfiltration of sensitive deployment secrets.

Remediation Guidance

The primary remediation for GHSA-7437-7HG8-FRRW is upgrading OpenClaw to version 2026.4.7-1 or a subsequent release. This update contains the expanded execution environment denylist and addresses related Server-Side Request Forgery (SSRF) issues present in earlier builds. Administrators must prioritize deployment in environments where OpenClaw instances are publicly accessible or process untrusted user inputs.

If immediate patching is unfeasible, administrators can apply manual environment hardening. This involves wrapping the OpenClaw service execution command to explicitly unset the vulnerable variables. A shell wrapper script ensures variables such as RUSTC_WRAPPER, CARGO_BUILD_RUSTC_WRAPPER, MAKEFLAGS, and HGRCPATH are stripped before the application initializes.

Organizations must enforce the principle of least privilege. OpenClaw should execute under a dedicated, unprivileged user account. This containment strategy limits the operational impact of remote code execution, preventing attackers from trivial privilege escalation or widespread system compromise following successful exploitation.

Technical Appendix

CVSS Score
9.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected Systems

OpenClaw versions < 2026.4.7Linux and Unix operating environments running OpenClaw

Affected Versions Detail

Product
Affected Versions
Fixed Version
OpenClaw
OpenClaw
< 2026.4.72026.4.7-1
AttributeDetail
CWE IDCWE-77, CWE-78, CWE-20
CVSS Score9.8 Critical
Attack VectorNetwork
ImpactRemote Code Execution
Exploit StatusProof of Concept
Affected Componentsrc/infra/exec/ environment handling

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1059.004Command and Scripting Interpreter: Unix Shell
Execution
T1548Abuse Elevation Control Mechanism
Privilege Escalation
CWE-77
Improper Neutralization of Special Elements used in a Command ('Command Injection')

The software constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Vulnerability Timeline

Internal discovery of vulnerability
2026-04-01
Patches committed to OpenClaw repository
2026-04-07
Public advisory GHSA-7437-7HG8-FRRW published
2026-04-08

References & Sources

  • [1]GitHub Advisory Database
  • [2]OpenClaw Security Policy
  • [3]Tauri RCE Advisory (Related Class)
  • [4]News Coverage

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•32 minutes ago•CVE-2026-76904
9.8

CVE-2026-76904: Unauthenticated SQL Injection in GeoTools PostGIS DataStore Component

A critical SQL injection vulnerability exists in the GeoTools open-source Java library. This vulnerability is situated within the post-processing phase of OGC Filter conversion inside the PostGIS DataStore module. Specifically, the `jsonArrayContains` function does not validate or sanitize its arguments before constructing PostgreSQL SQL/JSON path evaluation queries. An unauthenticated remote attacker can exploit this weakness by submitting crafted filters via standard OGC services like WFS or WMS to execute arbitrary SQL commands on the underlying database system.

Alon Barad
Alon Barad
0 views•5 min read
•about 2 hours ago•CVE-2026-61824
8.2

CVE-2026-61824: High-Severity Cross-Site Scripting (XSS) via Unsanitized Site Extractors in Defuddle

CVE-2026-61824 is a high-severity Cross-Site Scripting (XSS) vulnerability in kepano/defuddle before version 0.19.1. Custom site extractors for platforms such as X/Twitter, Substack, and YouTube constructed HTML representations via template string interpolation without output escaping. This allowed malicious pages to bypass standard parser sanitization routines and execute arbitrary JavaScript.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 3 hours ago•CVE-2026-63421
7.5

CVE-2026-63421: Query Limit Bypass via Negative Integer Input in KeystoneJS core resolvers

A high-severity vulnerability exists in KeystoneJS, a popular Node.js CMS and GraphQL framework, where the query resolution engine fails to validate signed negative integers within the pagination subsystem. Unauthenticated remote attackers can leverage this flaw to bypass the 'graphql.maxTake' safety boundary. By sending large negative values in the 'take' query parameter, the underlying Prisma ORM interprets the value as an instruction to fetch rows from the end of the collection, allowing malicious actors to bypass pagination limits, trigger database resource exhaustion, and execute application-level Denial of Service (DoS) attacks.

Alon Barad
Alon Barad
3 views•6 min read
•about 3 hours ago•CVE-2026-64679
8.1

CVE-2026-64679: Directory Traversal via Workspace Parameter in Atlantis

A critical path traversal vulnerability in Atlantis allows authenticated users or repository contributors to execute directory operations outside of the repository directory boundary via crafted workspace parameters in configuration files or API requests.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 5 hours ago•CVE-2026-76905
7.5

CVE-2026-76905: Denial of Service via Nil-Pointer Dereference in getkin/kin-openapi openapi3filter

CVE-2026-76905 is a high-severity Denial of Service (DoS) vulnerability in the getkin/kin-openapi library, specifically inside the openapi3filter sub-package. When processing multipart/form-data request validation errors, a missing nil-pointer guard causes a Go runtime panic during error formatting. This panic terminates the active server process if no recovery handler is present, resulting in a total denial of service. The vulnerability affects versions from v0.10.0 to v0.140.0, and is resolved in v0.141.0.

Alon Barad
Alon Barad
5 views•6 min read
•about 6 hours ago•CVE-2026-59989
9.2

CVE-2026-59989: Remote Code Execution via Server-Side Template Injection in Phalcon Volt Engine

A critical server-side template injection (SSTI) vulnerability exists in the Volt template engine of the Phalcon PHP framework. In versions 5.15.0 and earlier, raw AST token values for filter arguments in the 'join' filter are directly spliced into the generated PHP template code. This allows an attacker who can influence Volt templates to execute arbitrary PHP code during template rendering.

Amit Schendel
Amit Schendel
5 views•5 min read