OpenClaw Time-of-Check-Time-of-Use Vulnerability in Sandbox File Operations

Vulnerability

A time-of-check-time-of-use (TOCTOU) vulnerability has been identified in OpenClaw versions prior to 2026.3.31. This vulnerability exists within sandbox file operations, allowing attackers to bypass file descriptor-based defenses. By exploiting check-then-act patterns in the 'apply_patch', 'remove', and 'mkdir' operations, attackers can manipulate files between the validation and execution stages.

Impact

Exploitation of this vulnerability allows for general file manipulation within the sandbox, potentially leading to unauthorized file modifications or deletions.

Reproduction

The vulnerability can be reproduced by creating a patch that includes file operations such as adding, deleting, or modifying files. This patch can be applied using the 'apply_patch' operation, which will process the file changes. Due to the TOCTOU nature of the vulnerability, the 'apply_patch' operation can be manipulated to bypass the sandbox's file operation safeguards, leading to unintended file modifications or deletions.

Remediation

Users can update to OpenClaw version 2026.3.31 or later, where this vulnerability has been patched.

Added: Apr 23, 2026, 10:40 PM
Updated: Apr 23, 2026, 10:40 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
5.3
remediation
0.0
relevance
6.5
threat
4.8
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.