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-J9PV-RRCJ-6PFX

GHSA-j9pv-rrcj-6pfx: Insecure Environment Inheritance and Information Disclosure in OpenClaw

Amit Schendel
Amit Schendel
Senior Security Researcher

Apr 3, 2026·6 min read·30 visits

Executive Summary (TL;DR)

OpenClaw passes unsanitized environment variables to child processes in its SSH sandbox, exposing AI API keys to local and potentially remote attackers. Upgrading to v2026.3.31 patches this via a strict environment filtering utility.

OpenClaw versions prior to v2026.3.31 are vulnerable to information disclosure due to insecure environment inheritance in the SSH-based sandbox backends. The application passes the entire parent process environment, including sensitive AI provider API keys, to child processes.

Vulnerability Overview

OpenClaw is an open-source personal AI assistant that utilizes sandbox environments to execute operations safely. The application architecture relies on SSH-based backends, specifically the ssh-backend and openshell extensions, to manage these isolated operations. The vulnerability resides in how these components handle the underlying system environment when invoking child processes.

The system fails to filter the parent process environment variables before spawning new system commands. Consequently, highly sensitive configuration data necessary for the application's core functionality, such as OPENAI_API_KEY and ANTHROPIC_API_KEY, are inadvertently passed to untrusted subprocesses. This design flaw maps directly to CWE-214 (Invocation of Shell Command with Insecure Environment) and CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor).

Attackers can leverage this exposure to extract these credentials, leading to unauthorized consumption of paid AI services and potential data exposure. The scope of the vulnerability extends to both local system users and, depending on specific configuration parameters, remote entities interacting with the sandboxed environments.

Root Cause Analysis

The vulnerability originates from the implementation of the child_process module in Node.js within OpenClaw's sandbox management codebase. When developers invoke child_process.spawn to create processes like ssh or tar, the Node.js runtime defaults to inheriting the entire process.env object if no specific environment is defined. OpenClaw developers explicitly exacerbated this by manually passing the unfiltered process.env object to the env option.

In src/agents/sandbox/ssh-backend.ts and related modules, the parent process holds the critical API keys required to communicate with external AI providers. By supplying the parent environment wholesale to the child process, the security boundary between the management application and the utility subprocess is eliminated. The operating system subsequently allocates a dedicated memory space for the new process and copies the environment variables into it.

Once the environment variables reside within the child process's memory, the operating system tracks them in standard locations, such as the /proc filesystem on Linux. This mechanism ensures that any tool or process with adequate read permissions can access the exact execution state of the command, including the inadvertently shared API keys. The root cause is the absence of an explicit variable sanitization step prior to the execution of untrusted commands.

Code Analysis

An analysis of the vulnerable code path in src/agents/sandbox/ssh-backend.ts reveals the explicit passing of the parent environment. The original implementation passed the process.env object directly into the standard spawn options.

// VULNERABLE CODE (Pre-Patch)
const child = spawn(argv[0], argv.slice(1), {
  stdio: ["pipe", "pipe", "pipe"],
  env: process.env, // Direct leakage of all parent variables
  signal: params.signal,
});

The remediation strategy introduced in commit cfe14459531e002a1c61c27d97ec7dc8aecddc1f establishes an explicit filtering mechanism. The developers introduced a utility module named sanitize-env-vars.ts that implements an allow-list or deny-list approach to strip out sensitive keys. The updated spawn invocation processes the environment map before execution.

// PATCHED CODE (v2026.3.31)
import { sanitizeEnvVars } from "../sanitize-env-vars";
 
const sshEnv = sanitizeEnvVars(process.env).allowed;
const child = spawn(argv[0], argv.slice(1), {
  stdio: ["pipe", "pipe", "pipe"],
  env: sshEnv, // Sanitized map with API keys removed
  signal: params.signal,
});

This implementation successfully severs the inheritance chain for specific sensitive credentials. The sanitizeEnvVars function iterates through the parent environment and filters out matches against known high-value targets, such as OPENAI_API_KEY and AWS_SECRET_ACCESS_KEY, ensuring they are omitted from the resulting sshEnv object.

Exploitation

Exploitation of this vulnerability requires the attacker to either maintain local access to the host machine running OpenClaw or to exploit a misconfigured remote SSH server. The local attack vector is trivial. A local user executes standard process monitoring commands to read the environment blocks of active processes.

To verify the vulnerability locally, an attacker observes the process table to identify OpenClaw's subprocesses. Using the pgrep utility, the attacker finds the PID of the targeted ssh process. Subsequently, the attacker reads the /proc/[pid]/environ pseudo-file. Since the variables are null-terminated, piping the output through tr '\0' '\n' renders the sensitive credentials in plain text.

The remote exploitation scenario relies on the host's SSH client configuration. If the SSH client utilizes the SendEnv directive with wildcard matching (e.g., SendEnv *API_KEY), the SSH binary forwards the inherited variables to the remote sandbox. An attacker who has compromised the remote sandbox environment can then extract the keys simply by executing the env command within their active session.

Impact Assessment

The direct impact of this vulnerability is the complete compromise of the AI service provider credentials configured within OpenClaw. Because OpenClaw relies on services like OpenAI and Anthropic to function, these keys often possess elevated privileges and high rate limits. An attacker obtaining these keys can immediately repurpose them for unauthorized AI workload execution.

The financial implications are significant. AI provider APIs are typically billed by token consumption. Stolen keys used in automated campaigns can incur substantial charges for the victim before the provider detects the anomalous activity and rotates the credentials. Additionally, if the keys grant access to specialized fine-tuned models or custom data endpoints, the attacker gains unauthorized read access to proprietary intellectual property.

The vulnerability is assessed with a base CVSS 3.1 score of 5.5 in environments restricted to local exploitation. However, in deployments where SendEnv actively forwards these variables to untrusted network segments, the CVSS 3.1 score elevates to 8.6, reflecting the remote nature of the exposure and the high confidentiality impact.

Remediation

The primary remediation for this vulnerability is to upgrade the OpenClaw installation to version v2026.3.31 or later. This release incorporates the sanitizeEnvVars utility, permanently severing the environment inheritance chain for recognized sensitive variables. Administrators should prioritize this update to ensure the environment boundary is correctly maintained.

For systems where immediate patching is not feasible, administrators must apply compensating controls to the SSH configuration. Review the ~/.ssh/config and /etc/ssh/ssh_config files on the host machine running OpenClaw. Remove any SendEnv directives that match sensitive key patterns, such as wildcards that encompass API_KEY or SECRET.

Furthermore, adherence to the principle of least privilege mitigates the local attack vector. Ensure the OpenClaw process runs under a dedicated, unprivileged service account. Restrict local access to the server, preventing unauthorized users from accessing the /proc filesystem and reading the environment data of the OpenClaw service account.

Official Patches

OpenClawOfficial fix commit in the OpenClaw repository

Fix Analysis (1)

Technical Appendix

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

Affected Systems

OpenClaw ssh-backend componentOpenClaw openshell extension

Affected Versions Detail

Product
Affected Versions
Fixed Version
OpenClaw
OpenClaw
< 2026.3.312026.3.31
AttributeDetail
CWE IDCWE-214, CWE-200
Attack VectorLocal / Remote (Conditional)
CVSS Score8.6
Exploit StatusProof of Concept
ImpactHigh (Information Disclosure)
Patch StatusAvailable (v2026.3.31)

MITRE ATT&CK Mapping

T1552Unsecured Credentials
Credential Access
T1083File and Directory Discovery
Discovery
T1552.001Credentials In Files
Credential Access
CWE-214
Invocation of Shell Command with Insecure Environment

Exposure of Sensitive Information to an Unauthorized Actor via Insecure Environment Inheritance.

Vulnerability Timeline

Vulnerability addressed and fix commit pushed to openclaw/openclaw
2026-03-30
Official release v2026.3.31 published
2026-03-31
GitHub Advisory GHSA-j9pv-rrcj-6pfx published
2026-03-31

References & Sources

  • [1]GitHub Advisory: GHSA-j9pv-rrcj-6pfx
  • [2]OpenClaw Repository
  • [3]OpenClaw Sandboxing Documentation

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

•about 1 hour ago•GHSA-JF24-8G2H-2WG7
7.2

GHSA-JF24-8G2H-2WG7: Remote Code Execution in LibreNMS AboutController via Binary Path Substitution

A critical security flaw in LibreNMS allows authenticated administrators to execute arbitrary commands by modifying the configured binary path for snmpget and accessing the About page. This occurs due to insufficient verification of the executable file's identity and integrity prior to executing it with shell_exec.

Amit Schendel
Amit Schendel
0 views•6 min read
•about 2 hours ago•GHSA-7CJ5-V4PP-V632
4.8

GHSA-7cj5-v4pp-v632: Stored Cross-Site Scripting in LibreNMS Graph Descriptions

LibreNMS versions prior to 26.7.0 are vulnerable to a stored Cross-Site Scripting (XSS) vulnerability. An authenticated administrator can inject arbitrary HTML or JavaScript into graph descriptions via specific administrative configuration endpoints. When another authenticated user views the affected graph, the unescaped payload executes within their browser context.

Alon Barad
Alon Barad
1 views•5 min read
•about 3 hours ago•GHSA-7GWW-X7FH-JF9J
8.1

GHSA-7GWW-X7FH-JF9J: SSRF-Driven Stored Cross-Site Scripting in LibreNMS Oxidized Integration

An injection vulnerability in LibreNMS's Oxidized integration component allows administrative or network-positioned attackers to achieve stored cross-site scripting (XSS). By setting a malicious oxidized.url endpoint, the server makes outbound queries and processes returned JSON fields containing malicious HTML or JavaScript. These payloads are outputted directly in the web UI without appropriate output encoding.

Amit Schendel
Amit Schendel
2 views•6 min read
•about 4 hours ago•CVE-2026-17106
7.1

CVE-2026-17106: Container-to-Host Arbitrary File Write in moby/go-archive (CopyEscape)

CVE-2026-17106 (CopyEscape) is a container-to-host arbitrary file-write vulnerability within Docker's archiving and extraction library moby/go-archive. By utilizing a Time-of-Check to Time-of-Use (TOCTOU) race condition during the file-walking stage inside a running container, a malicious container process can force the host engine to produce a compromised tar stream. During client-side extraction, the Docker CLI resolves directory entries through absolute symbolic links, resulting in arbitrary file creation or modification on the host system.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 5 hours ago•CVE-2026-73974
5.5

CVE-2026-73974: Local Path Traversal and Privilege Escalation in Linuxfabrik Monitoring Plugins

CVE-2026-73974 is a local path traversal vulnerability in linuxfabrik-lib and Linuxfabrik Monitoring Plugins. Under standard monitoring configurations running with elevated privileges via sudo, this flaw can be exploited by an unprivileged local user to read arbitrary root-only files, resulting in local privilege escalation.

Alon Barad
Alon Barad
4 views•5 min read
•about 6 hours ago•CVE-2026-71417
7.3

CVE-2026-71417: Authorization Bypass Leading to Unauthorized TLS Certificate Revocation in Netflix Lemur

CVE-2026-71417 is an authorization bypass vulnerability (CWE-639) in Netflix Lemur, an open-source TLS certificate management framework. In versions prior to 1.9.3, a low-privileged authenticated user can bypass role and certificate-level permission boundaries to revoke arbitrary managed TLS certificates at the upstream Certificate Authority (CA). This vulnerability stems from an architectural issue where Lemur evaluates authorization against internal database row ownership rather than the unique, cryptographic identity of the certificate. An attacker can exploit this flaw by uploading a duplicate record of a target certificate and requesting its revocation, triggering a downstream CA-side revocation and a subsequent denial-of-service (DoS) condition for services relying on the target certificate.

Amit Schendel
Amit Schendel
6 views•6 min read