CVE-2026-41294
Received Received - Intake
Environment Variable Injection in OpenClaw via Untrusted .env File

Publication date: 2026-04-21

Last updated on: 2026-04-27

Assigner: VulnCheck

Description
OpenClaw before 2026.3.28 loads the current working directory .env file before trusted state-dir configuration, allowing environment variable injection. Attackers can place a malicious .env file in a repository or workspace to override runtime configuration and security-sensitive environment settings during OpenClaw startup.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-21
Last Modified
2026-04-27
Generated
2026-06-16
AI Q&A
2026-04-21
EPSS Evaluated
2026-06-14
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
openclaw openclaw to 2026.3.28 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-15 One or more system settings or configuration elements can be externally controlled by a user.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

CVE-2026-41294 is a critical vulnerability in the OpenClaw npm package versions before 2026.3.28 where the application loads a .env file from the current working directory (CWD) before loading the trusted state-dir configuration.

This behavior allows an attacker to place a malicious .env file in a repository or workspace, which injects untrusted environment variables and overrides runtime configuration and security-sensitive settings during OpenClaw startup.

The vulnerability is related to untrusted search path issues (CWE-426) and external control of system or configuration settings (CWE-15). It was fixed in version 2026.3.28 by filtering out untrusted .env entries from the CWD before startup.

Impact Analysis

This vulnerability can allow an attacker to take over configuration settings by injecting malicious environment variables, potentially leading to severe security breaches.

  • Unauthorized control over system or configuration settings.
  • Significant impact on confidentiality, integrity, and availability of the system.
  • Potential exposure of sensitive data and disruption of service availability.
Detection Guidance

This vulnerability can be detected by checking if there is a .env file present in the current working directory (CWD) of OpenClaw before startup, as the application loads this file prior to the trusted state-dir configuration. Presence of a malicious or unexpected .env file in the workspace or repository could indicate exploitation.

You can manually inspect the current working directory for any .env files using commands like:

  • ls -la .env
  • cat .env

Additionally, you can check the OpenClaw version to ensure it is not vulnerable (versions prior to 2026.3.28 are affected):

  • openclaw --version

Monitoring for unexpected environment variable changes or suspicious startup behavior of OpenClaw may also help detect exploitation attempts.

Mitigation Strategies

The immediate mitigation step is to upgrade OpenClaw to version 2026.3.28 or later, where the vulnerability has been fixed by filtering out untrusted .env entries from the current working directory before startup.

Additionally, ensure that no untrusted or malicious .env files exist in the current working directory or any workspace/repository directories used by OpenClaw.

Restrict write permissions to directories where OpenClaw runs to prevent attackers from placing malicious .env files.

Review and monitor environment variables and runtime configurations for unauthorized changes.

Compliance Impact

The vulnerability allows attackers to inject malicious environment variables that can override runtime configuration and security-sensitive settings during OpenClaw startup. This can lead to unauthorized control over system or configuration settings, potentially causing significant breaches in confidentiality, integrity, and availability of data.

Such breaches could impact compliance with common standards and regulations like GDPR and HIPAA, which require strict protection of sensitive data and system integrity. Unauthorized access or modification of sensitive data due to this vulnerability may result in violations of these regulations.

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