CVE-2026-41384
Environment Variable Injection in OpenClaw CLI Enables Code Execution
Publication date: 2026-04-28
Last updated on: 2026-05-01
Assigner: VulnCheck
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| openclaw | openclaw | to 2026.3.24 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-15 | One or more system settings or configuration elements can be externally controlled by a user. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-41384 is an environment variable injection vulnerability in OpenClaw versions before 2026.3.24. It occurs in the CLI backend runner, where attackers can inject malicious environment variables by crafting specially designed workspace configuration files.
These malicious environment variables are introduced into the backend process spawning mechanism, which can lead to arbitrary code execution or exposure of sensitive data.
The root cause is unsafe handling of environment variable overrides, allowing attackers to override critical variables like PATH, NODE_OPTIONS, or LD_PRELOAD, which can be exploited to execute harmful code or load malicious libraries.
The vulnerability was fixed in OpenClaw version 2026.3.24 by sanitizing the environment variables before spawning backend processes, blocking dangerous overrides and removing unwanted variables.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
Detection of this vulnerability involves identifying if your OpenClaw installation is a version prior to 2026.3.24 and if malicious workspace configuration files are present that inject environment variables into the CLI backend runner.
Since the vulnerability involves environment variable injection through workspace configs, you can check for suspicious or unexpected environment variables being set in the backend processes spawned by OpenClaw.
Suggested commands include inspecting the environment variables of running OpenClaw backend processes and reviewing workspace configuration files for unusual environment variable definitions.
- Use commands like `ps eww -C openclaw` or `ps auxww | grep openclaw` to view environment variables of running OpenClaw processes.
- Examine workspace configuration files for environment variable settings that could be malicious, for example by using `grep -r 'env' /path/to/workspace/configs`.
- Check for suspicious environment variables such as `NODE_OPTIONS`, `LD_PRELOAD`, `PATH`, or `HOME` being overridden in unexpected ways.
What immediate steps should I take to mitigate this vulnerability?
The primary mitigation step is to upgrade OpenClaw to version 2026.3.24 or later, where the vulnerability has been fixed by sanitizing environment variables before spawning CLI backend processes.
If upgrading immediately is not possible, restrict or audit workspace configuration files to prevent injection of malicious environment variables.
Additionally, monitor and sanitize environment variables passed to backend processes, especially blocking overrides of critical variables like `PATH`, `HOME`, `NODE_OPTIONS`, and `LD_PRELOAD`.
Implement strict controls on who can modify workspace configurations and consider isolating OpenClaw backend processes to limit potential impact.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The vulnerability in OpenClaw allows attackers to inject arbitrary environment variables into backend processes, potentially leading to code execution or exposure of sensitive data.
Exposure of sensitive data or unauthorized code execution can lead to violations of data protection regulations such as GDPR or HIPAA, which require safeguarding personal and sensitive information against unauthorized access or disclosure.
Therefore, if exploited, this vulnerability could compromise the confidentiality and integrity of sensitive data, impacting compliance with these common standards and regulations.
How can this vulnerability impact me? :
This vulnerability can have serious impacts including unauthorized code execution and exposure of sensitive information.
- Attackers can execute arbitrary code on the system by injecting malicious environment variables.
- Sensitive data may be exposed due to the injection of environment variables that affect backend processes.
- It can lead to privilege escalation or compromise of the system running OpenClaw.