Shell Expansion Vulnerability in OpenClaw Package

openclaw Updated 05 May 2026

Summary

04/05/2026
MODERATE
Yes i
Moderate
Not published

GHSA-x3h8-jrgh-p8jx: OpenClaw's exec allowlist analysis rejects shell expansion in unquoted heredocs. Affects openclaw versions < 2026.4.22. Fixed in 2026.4.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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

OpenClaw is an npm package designed for executing commands in a controlled environment with an exec allowlist feature. This functionality is crucial for maintaining security by ensuring that only approved commands can be executed. However, a recent vulnerability has been identified that affects versions up to 2026.4.21, allowing potential shell expansion in unquoted heredocs, which could lead to unauthorized command execution.

Vulnerability Detail

The vulnerability arises from the exec allowlist analysis rejecting shell expansion in unquoted heredocs. This means that an attacker could craft an approved command that appears safe but actually contains malicious shell expansions within the heredoc body. As a result, the command executed at runtime could differ significantly from what was initially approved, leading to potential security breaches.

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

This is the first release that contains the fix.

npm install openclaw@2026.4.22

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

Workaround

Currently, there are no specific workarounds mentioned for this vulnerability other than updating to the fixed version. It is advisable to avoid using unquoted heredocs in your commands until the package is updated.

Conclusion

In summary, the OpenClaw package has a vulnerability that allows for shell expansion in unquoted heredocs, affecting versions up to 2026.4.21. Users are advised to update to version 2026.4.22 to fix this issue and ensure the security of their applications.

See every vulnerability recorded for openclaw →

Share this vulnerability

FAQ

OpenClaw is an npm package that allows for the execution of commands in a secure manner by using an exec allowlist.

Versions of OpenClaw up to and including 2026.4.21 are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Check your application using the Vulert playground at Vulert Scanner without any signup.

The risks include unauthorized command execution due to hidden shell expansions in unquoted heredocs, which could compromise the security of your application.

Yes, a patch is available in version 2026.4.22 of OpenClaw. It is recommended to update to this version to mitigate the vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for openclaw.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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

This is the first release that contains the fix.

npm install openclaw@2026.4.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

Follow Vulert in Google

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