OpenClaw versions prior to 2026.2.25 contain a time-of-check-time-of-use vulnerability in approval-bound system.run execution where the cwd parameter is validated at approval time but resolved at execution time. Attackers can retarget a symlinked cwd between approval and execution to bypass command execution restrictions and execute arbitrary commands on node hosts.
OpenClaw versions before 2026.2.25 contain a time-of-check-time-of-use (TOCTOU) vulnerability in the approval-bound system.run execution mechanism. Attackers can manipulate symlinked working directories between approval and execution phases to bypass command execution restrictions and achieve arbitrary code execution on node hosts. This vulnerability poses a significant risk to organizations using OpenClaw for infrastructure automation and command execution workflows.
Immediate Actions:
1. Identify all OpenClaw deployments in your environment and document versions currently in use
2. Restrict access to OpenClaw approval workflows to trusted administrators only
3. Implement file system monitoring on directories containing symlinks used in OpenClaw cwd parameters
4. Review approval logs for any suspicious cwd parameter changes or symlink manipulations
Patching Guidance:
1. Upgrade to OpenClaw version 2026.2.25 or later when available
2. Until patch is available, implement compensating controls:
- Use read-only file systems or immutable snapshots for cwd directories
- Implement SELinux or AppArmor policies to restrict symlink resolution in OpenClaw execution contexts
- Disable symlink support in cwd parameters if functionality permits
Compensating Controls:
1. Deploy file integrity monitoring (FIM) on all directories used as cwd parameters
2. Implement strict change control procedures requiring re-approval if cwd paths are modified
3. Use containerized execution environments with restricted file system access
4. Enable audit logging for all symlink creation/modification events
Detection Rules:
1. Alert on symlink creation/modification in directories used as OpenClaw cwd parameters
2. Monitor for approval records where cwd path differs from actual resolved path at execution time
3. Track execution of commands with unexpected working directories
4. Flag approval-to-execution time gaps exceeding normal thresholds
الإجراءات الفورية:
1. حدد جميع نشرات OpenClaw في بيئتك وتوثيق الإصدارات المستخدمة حالياً
2. قيد الوصول إلى سير عمل موافقة OpenClaw للمسؤولين الموثوقين فقط
3. طبق مراقبة نظام الملفات على المجلدات التي تحتوي على روابط رمزية المستخدمة في معاملات cwd
4. راجع سجلات الموافقة للكشف عن أي تغييرات مريبة في معاملات cwd أو تلاعب بالروابط الرمزية
إرشادات التصحيح:
1. قم بالترقية إلى إصدار OpenClaw 2026.2.25 أو أحدث عند توفره
2. حتى يتوفر التصحيح، طبق عناصر تحكم تعويضية:
- استخدم أنظمة ملفات للقراءة فقط أو لقطات ثابتة لمجلدات cwd
- طبق سياسات SELinux أو AppArmor لتقييد دقة الروابط الرمزية في سياقات تنفيذ OpenClaw
- عطل دعم الروابط الرمزية في معاملات cwd إن أمكن
عناصر التحكم التعويضية:
1. نشر مراقبة سلامة الملفات (FIM) على جميع المجلدات المستخدمة كمعاملات cwd
2. طبق إجراءات تحكم صارمة في التغيير تتطلب إعادة موافقة إذا تم تعديل مسارات cwd
3. استخدم بيئات التنفيذ المحتوية مع وصول نظام ملفات مقيد
4. فعّل تسجيل التدقيق لجميع أحداث إنشاء/تعديل الروابط الرمزية
قواعد الكشف:
1. تنبيهات عند إنشاء/تعديل الروابط الرمزية في المجلدات المستخدمة كمعاملات cwd
2. مراقبة سجلات الموافقة حيث يختلف مسار cwd عن المسار المحل الفعلي وقت التنفيذ
3. تتبع تنفيذ الأوامر مع مجلدات عمل غير متوقعة
4. وضع علم على فجوات الموافقة إلى التنفيذ التي تتجاوز الحدود الطبيعية