Environment Variable Injection Vulnerability in OpenClaw: Impact on Dependency Resolution

openclaw Updated 23 Jun 2026

Summary

16/06/2026
HIGH
No i
High
7.1

GHSA-4qgr-57jq-93vh: Duplicate Advisory: Workspace .env STATE_DIRECTORY could influence bundled runtime dependency roots. Affected versions are not published. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

OpenClaw is an open-source project designed for building interactive applications using Node.js. It allows developers to manage various aspects of their applications through a workspace environment. However, it has been found to be vulnerable to an environment variable injection issue that can affect the integrity of its runtime dependency management.

Vulnerability Detail

The vulnerability arises from the manipulation of the STATE_DIRECTORY environment variable within the workspace .env file. Attackers can exploit this by altering the STATE_DIRECTORY to point to unintended local paths, which may lead to the loading of malicious runtime dependencies. This can result in the execution of arbitrary code during the dependency resolution process, posing a significant security risk to applications using OpenClaw.

How To Fix

No fixed version is published for this vulnerability.

To fix this vulnerability, update OpenClaw to version 2026.5.2 or later. You can do this by running the following command in your terminal: 'npm install openclaw@latest'. This will ensure that you are using a version of the package that has addressed the vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, ensure that the STATE_DIRECTORY variable in your .env file is set to a secure and controlled path. Avoid using user-controlled input to set this variable, and validate any paths that are used.

Conclusion

The environment variable injection vulnerability in OpenClaw poses a significant risk by allowing attackers to manipulate dependency paths. It is crucial for users to update to the latest version to mitigate this risk and ensure the security of their applications.

See every vulnerability recorded for openclaw →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.1, indicating a high severity level.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit the Vulert playground at Vulert Scanner to check if your application is affected without requiring any signup.

If exploited, this vulnerability can allow attackers to execute malicious code, potentially compromising the security of the application and its data.

Yes, the vulnerability has been patched in version 2026.5.2 of OpenClaw. It is recommended to update to this version or later.

If an immediate update is not possible, ensure that the STATE_DIRECTORY variable is set to a secure path and avoid using untrusted input to define it.

Related vulnerabilities

Recent vulnerabilities recorded for openclaw.

How To Fix

No fixed version is published for this vulnerability.

To fix this vulnerability, update OpenClaw to version 2026.5.2 or later. You can do this by running the following command in your terminal: 'npm install openclaw@latest'. This will ensure that you are using a version of the package that has addressed the vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.