CVE-2026-41387
Received Received - Intake
Host Env Variable Sanitization Flaw in OpenClaw Enables Code Execution

Publication date: 2026-04-28

Last updated on: 2026-04-30

Assigner: VulnCheck

Description
OpenClaw before 2026.3.22 contains an incomplete host environment variable sanitization vulnerability in host-env-security-policy.json and host-env-security.ts that allows package-manager environment overrides. Attackers can exploit approved exec requests to redirect package resolution or runtime bootstrap to attacker-controlled infrastructure and execute trojanized content.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-28
Last Modified
2026-04-30
Generated
2026-06-16
AI Q&A
2026-04-28
EPSS Evaluated
2026-06-14
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
openclaw openclaw to 2026.3.22 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-183 The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are explicitly allowed by policy because the inputs are assumed to be safe, but the list is too permissive - that is, it allows an input that is unsafe, leading to resultant weaknesses.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

CVE-2026-41387 is a critical vulnerability in OpenClaw versions before 2026.3.22 caused by incomplete sanitization of host environment variables. Specifically, the vulnerability exists in the files host-env-security-policy.json and host-env-security.ts, where insufficient filtering allows attackers to override package-manager environment variables.

This flaw enables attackers to exploit approved execution requests to redirect package resolution or runtime bootstrap processes to attacker-controlled infrastructure, which can lead to the execution of trojanized (malicious) content.

The underlying weakness is classified as CWE-183 (Permissive List of Allowed Inputs), meaning the protection mechanism relies on an overly permissive allowlist that fails to exclude unsafe inputs, leading to security weaknesses.

Impact Analysis

This vulnerability can have severe impacts because it allows attackers to redirect package resolution or runtime bootstrap to attacker-controlled infrastructure.

As a result, attackers can execute trojanized content, which means malicious code can run within your environment without detection.

  • Potential execution of malicious code.
  • Compromise of system integrity and confidentiality.
  • Possible disruption of service availability.

The vulnerability requires no privileges and can be exploited remotely with some user interaction, making it easier for attackers to leverage.

Detection Guidance

This vulnerability involves incomplete sanitization of host environment variables that allow attackers to override package-manager environment variables, potentially redirecting package resolution or runtime bootstrap to attacker-controlled infrastructure.

To detect this vulnerability on your system, you should check the version of OpenClaw installed and inspect the environment variables related to the package manager for any suspicious overrides.

  • Check OpenClaw version: `openclaw --version` or check the installed package version to ensure it is 2026.3.22 or later.
  • List environment variables related to package management and host environment overrides, for example: `env | grep -i 'OPENCLAW'` or `env | grep -E 'PACKAGE_MANAGER|HOST_ENV'`.
  • Monitor execution requests or logs for any unexpected redirection or network calls to unknown or attacker-controlled infrastructure.
Mitigation Strategies

The primary mitigation step is to upgrade OpenClaw to version 2026.3.22 or later, as this version contains the fix for the incomplete host environment variable sanitization vulnerability.

Additionally, you should audit and restrict environment variables related to package management to prevent unauthorized overrides.

  • Upgrade OpenClaw to version 2026.3.22 or later (latest stable release 2026.3.28 contains the fix).
  • Review and harden host environment variable policies to block unsafe or unexpected inputs.
  • Monitor and restrict execution requests that could be exploited to redirect package resolution or runtime bootstrap.
Compliance Impact

The provided information does not specify how CVE-2026-41387 affects compliance with common standards and regulations such as GDPR or HIPAA.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-41387. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart