TOCTOU Race Condition Vulnerability in OpenClaw Package

openclaw Updated 16 Apr 2026

Summary

16/04/2026
LOW
Yes i
Low
2.1

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 ↓

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 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 →

Share this vulnerability

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.

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

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