TOCTOU Race Condition Vulnerability in OpenClaw Package
Summary
GHSA-gj9q-8w99-mp8j: OpenClaw: TOCTOU read in exec script preflight. Affects openclaw versions < 2026.4.10. Fixed in 2026.4.10. 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 scripts in a controlled environment. It validates scripts before execution to ensure they meet specific criteria, thus enhancing security. However, it has a vulnerability that allows for a Time-of-Check to Time-of-Use (TOCTOU) race condition, which can lead to unintended script execution.
Vulnerability Detail
The vulnerability arises from OpenClaw's exec script preflight validator, which validates a script by its pathname and then reads it. A local attacker could exploit this by swapping the script file between validation and reading, leading to a situation where the file inspected during preflight analysis is different from the one that passed the initial validation. This could potentially expose sensitive information or execute malicious scripts, although the impact is limited to derived content rather than full-file disclosure.
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.10
This is the first release that contains the fix.
npm install openclaw@2026.4.10
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using the affected functionality until you can upgrade to the patched version. Ensure that your workspace paths are secured against unauthorized write access to mitigate the risk of exploitation.
Conclusion
The TOCTOU race condition vulnerability in the OpenClaw package poses a risk of unintended script execution. Users should upgrade to version 2026.4.10 or newer to mitigate this risk. Utilizing tools like Vulert can help monitor for such vulnerabilities effectively.
See every vulnerability recorded for openclaw →
FAQ
It is a TOCTOU race condition that allows an attacker to swap files between validation and reading, potentially leading to unintended script execution.
You can check your application for this vulnerability using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your package-lock.json.
While the impact is limited, it could lead to the execution of unintended scripts, exposing sensitive information or executing malicious code.
Yes, a patch is available in version 2026.4.10 and later. Users are encouraged to upgrade to this version.
Vulert is a tool that monitors and alerts for open-source vulnerabilities in your software using just the package-lock.json file. It provides real-time insights without requiring code access.
References
Related vulnerabilities
Recent vulnerabilities recorded for openclaw.