OpenClaw Vulnerability: Unvalidated SHELL Path in Environment Fallback

openclaw Updated 04 Mar 2026

Summary

03/03/2026
MODERATE
Yes i
Moderate
4.5

GHSA-f8mp-vj46-cq8v: OpenClaw's shell env fallback trusts unvalidated SHELL path from host environment. Affects openclaw versions < 2026.2.22. Fixed in 2026.2.22. 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 a package designed for managing shell environments in Node.js applications. It allows developers to interact with the shell and execute commands seamlessly. However, it has a vulnerability that arises from trusting the SHELL environment variable without validation, potentially allowing an attacker to execute arbitrary commands if the environment is compromised.

Vulnerability Detail

The vulnerability in OpenClaw stems from its reliance on the SHELL environment variable, which can be manipulated by an attacker in an untrusted environment. When OpenClaw attempts to load the shell environment using the command '$SHELL -l -c 'env -0'', it does not validate whether the SHELL variable points to a trusted executable. This oversight can lead to the execution of malicious commands, posing a significant security risk. The vulnerability is classified under CWE-426 (Use of Untrusted Search Path) and CWE-78 (OS Command Injection), with a CVSS score of 4.5, indicating a moderate severity level.

How To Fix

Latest published version: 2026.10.6 as of 22 Oct 2026

npm install openclaw@2026.10.6

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2026.2.22

This is the first release that contains the fix.

npm install openclaw@2026.2.22

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can unset the SHELL environment variable before running OpenClaw by executing the following command in your terminal: 'unset SHELL'. This will prevent OpenClaw from using an untrusted SHELL path, but it is recommended to update to the patched version as soon as possible for a permanent fix.

Conclusion

The OpenClaw package has a vulnerability related to unvalidated SHELL paths that can lead to command injection if exploited. It is crucial to update to the patched version 2026.2.22 to mitigate this risk. Additionally, using tools like Vulert can help monitor for such vulnerabilities in real-time.

See every vulnerability recorded for openclaw →

Share this vulnerability

FAQ

The vulnerability allows for the execution of arbitrary commands due to unvalidated SHELL paths inherited from the host environment.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without any signup.

Update OpenClaw to version 2026.2.22 or later to apply the necessary security patch.

Failure to address this vulnerability could lead to unauthorized command execution, compromising the security of your application.

Yes, you can unset the SHELL environment variable temporarily as a workaround until you can update to the patched version.

Related vulnerabilities

Recent vulnerabilities recorded for openclaw.

How To Fix

Latest published version: 2026.10.6 as of 22 Oct 2026

npm install openclaw@2026.10.6

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2026.2.22

This is the first release that contains the fix.

npm install openclaw@2026.2.22

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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