Shell Expansion Vulnerability in OpenClaw Package
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for openclaw.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.