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·26 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 9 hours ago•CVE-2026-54068
5.9

CVE-2026-54068: Unauthenticated Server-Side Template Injection and SQLite Exfiltration in SiYuan PKM

An authentication bypass in the SiYuan personal knowledge management system before version 3.7.0 exposes a dynamic icon rendering endpoint. This endpoint processes client-supplied Go template directives. By submitting a crafted request, an unauthenticated remote attacker can leverage registered database template functions to execute arbitrary read-only SQL queries and exfiltrate workspace contents.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 9 hours ago•CVE-2026-54069
9.1

CVE-2026-54069: Authentication Bypass in SiYuan Note via Origin Header Spoofing

CVE-2026-54069 is a critical authentication bypass vulnerability in the SiYuan Note personal knowledge management system. The flaw is located in the HTTP server's middleware handling API authorization, which unconditionally trusts requests carrying a 'chrome-extension://' scheme in the Origin HTTP header, granting administrative access without validating API tokens.

Alon Barad
Alon Barad
4 views•5 min read
•about 10 hours ago•CVE-2026-54089
9.1

CVE-2026-54089: Authentication Bypass by Spoofing in File Browser

CVE-2026-54089 is a critical authentication bypass vulnerability in File Browser affecting instances configured with proxy-based authentication. An unauthenticated remote attacker with direct network access can impersonate arbitrary users or register new accounts by spoofing configured HTTP headers.

Amit Schendel
Amit Schendel
4 views•7 min read
•about 10 hours ago•GHSA-99J7-FHR2-XFJ4
10.0

GHSA-99J7-FHR2-XFJ4: Malicious Remote Code Execution Payload in 'exploration' Cargo Crate

The malicious Cargo package 'exploration' was uploaded to the crates.io registry. During compilation or package import, the crate executes code designed to establish an outbound TCP/HTTP connection, download an external second-stage binary, and execute the binary locally on the host machine. This creates an unauthenticated remote code execution vector impacting developer environments and continuous integration pipelines.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 11 hours ago•CVE-2026-54088
9.3

CVE-2026-54088: Pre-Authentication Remote Code Execution in File Browser Hook Authentication

CVE-2026-54088 is a critical command injection vulnerability in File Browser prior to version 2.63.6. When Hook Authentication is enabled, the application interpolates unsanitized credentials into a shell command, allowing unauthenticated remote code execution.

Alon Barad
Alon Barad
6 views•6 min read
•about 11 hours ago•GHSA-QV4M-M73M-8HJ7
8.8

GHSA-qv4m-m73m-8hj7: Authenticated Arbitrary File Upload leading to Remote Code Execution in NotrinosERP

An authenticated remote code execution vulnerability exists in NotrinosERP (versions up to and including 1.0.0) within the Human Resource Management (HRM) module. Users with employee management permissions can upload arbitrary file types, including PHP scripts, which are written directly to a web-accessible directory. This allows for arbitrary code execution in the context of the web-server user.

Alon Barad
Alon Barad
5 views•6 min read