Openclaw cli: OpenClaw: Sandbox file operations use check-then-act, bypassing fd-based TOCTOU defenses (CVE-2026-41338)
Description
OpenClaw CLI versions prior to 2026.3.31 have a sandbox file operation vulnerability where check-then-act logic bypasses file descriptor-based TOCTOU (Time-Of-Check to Time-Of-Use) defenses. This issue affects workspace-only apply_patch, remove, and mkdir operations within the sandbox workspace mutation boundary. The vulnerability is addressed in version 2026.3.31 and later.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The OpenClaw CLI package versions from 2026.1.29 up to but not including 2026.3.31 contain a vulnerability (CVE-2026-41338) in sandbox file operations. These operations use a check-then-act pattern that bypasses file descriptor-based TOCTOU protections, specifically in workspace-only apply_patch, remove, and mkdir commands. The scope is limited to sandbox workspace mutations. The vulnerability was fixed in commit 32a4a47d602e0618f87b3e59f94d8c142767f860 and released in version 2026.3.31.
Potential Impact
Exploitation of this vulnerability could allow an attacker with low privileges to perform time-of-check to time-of-use bypasses in sandboxed file operations, potentially leading to unauthorized file system mutations within the sandbox workspace. The normalized severity is medium, indicating a moderate risk that requires attention but is not critical.
Mitigation Recommendations
A patch is available and should be applied by upgrading OpenClaw CLI to version 2026.3.31 or later. This update addresses the TOCTOU bypass in sandbox file operations. No additional mitigation actions are indicated by the vendor advisory.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-openclaw-cli-CVE-2026-41338
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6ac245a412601ec6a316619f
Added to database: 10/04/2026, 12:25:08 UTC
Last enriched: 10/04/2026, 12:50:29 UTC
Last updated: 10/04/2026, 16:08:38 UTC
Views: 1
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.