High-Risk Vulnerability in OpenClaw: Shell-Env Trusted Prefix Fallback Allows Attacker-Controlled Binary Execution

openclaw Updated 04 Mar 2026

Summary

03/03/2026
HIGH
Yes i
High
8.5

GHSA-p4wh-cr8m-gm6c: OpenClaw: shell-env trusted-prefix fallback allowed attacker-controlled binary execution via $SHELL. Affects openclaw versions >= 2026.2.22, < 2026.2.23. Fixed in 2026.2.23. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

OpenClaw is an npm package designed to facilitate various functionalities in JavaScript applications. It allows developers to manage shell environments effectively. However, a recent vulnerability has been identified that compromises the security of the package, particularly in scenarios where the runtime environment can be influenced by an attacker.

Vulnerability Detail

The vulnerability arises from the shell-env fallback mechanism that accepts executable paths for the $SHELL variable. In affected versions, the selection process allows either a shell listed in /etc/shells or any executable under hardcoded trusted prefixes. This can lead to the execution of attacker-controlled binaries if the trusted-prefix directory is writable and the runtime $SHELL can be influenced. The ramifications include unauthorized access and potential system compromise, making this a significant security risk.

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.23

This is the first release that contains the fix.

npm install openclaw@2026.2.23

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

Workaround

As a temporary workaround, you can manually ensure that the $SHELL variable points to a secure shell listed in /etc/shells and avoid using writable trusted-prefix directories for shell executables.

Conclusion

The OpenClaw package has a critical vulnerability that allows for the execution of attacker-controlled binaries due to a flawed shell-env fallback mechanism. It is essential to update to the patched version 2026.2.23 to mitigate this risk. Additionally, users should consider using Vulert for ongoing monitoring of vulnerabilities in their dependencies.

See every vulnerability recorded for openclaw →

Share this vulnerability

FAQ

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

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The potential consequences include unauthorized execution of binaries, which could lead to system compromise and data breaches.

Yes, Vulert can monitor and alert you in real-time for open-source vulnerabilities in your software using just the package-lock.json file.

If you cannot update the package immediately, ensure that your $SHELL variable is set to a secure shell and avoid using writable directories for trusted prefixes.

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.23

This is the first release that contains the fix.

npm install openclaw@2026.2.23

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

Follow Vulert in Google

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