OpenClaw before 2026.3.11 contains an approval integrity vulnerability allowing attackers to execute rewritten local code by modifying scripts between approval and execution when exact file binding cannot occur. Remote attackers can change approved local scripts before execution to achieve unintended code execution as the OpenClaw runtime user.
OpenClaw before version 2026.3.11 contains a critical approval integrity vulnerability (CWE-367: Time-of-check Time-of-use) that allows attackers to modify approved scripts between approval and execution, leading to arbitrary code execution with OpenClaw runtime privileges. This vulnerability affects Node.js-based deployments and poses significant risk to organizations using OpenClaw for automation and orchestration tasks. While no public exploit is currently available, the vulnerability is easily exploitable once understood, making immediate mitigation essential.
IMMEDIATE ACTIONS:
1. Identify all OpenClaw deployments across your infrastructure using asset discovery tools and CMDB queries
2. Isolate affected OpenClaw instances from production networks if possible, or implement strict network segmentation
3. Review OpenClaw approval logs and script execution history for suspicious modifications or unauthorized changes
4. Implement file integrity monitoring (FIM) on all OpenClaw script directories using tools like Tripwire or AIDE
5. Enable comprehensive audit logging for all script approval and execution events
PATCHING GUIDANCE:
1. Upgrade to OpenClaw version 2026.3.11 or later immediately upon release
2. Subscribe to OpenClaw security advisories and vendor notifications
3. Test patches in isolated lab environments before production deployment
4. Maintain rollback procedures for critical systems
COMPENSATING CONTROLS (until patch available):
1. Implement cryptographic signing of all approved scripts using HMAC-SHA256 or RSA signatures
2. Deploy read-only file systems for approved script directories using SELinux or AppArmor
3. Restrict OpenClaw runtime user privileges using principle of least privilege (dedicated service account with minimal permissions)
4. Implement mandatory code review and dual-approval workflows for all script changes
5. Use containerization (Docker/Kubernetes) with immutable image layers to prevent runtime script modification
6. Deploy Web Application Firewall (WAF) rules to detect script modification attempts
DETECTION RULES:
1. Monitor for file modification events in OpenClaw script directories between approval timestamp and execution timestamp
2. Alert on any write operations to approved script files by non-OpenClaw processes
3. Detect discrepancies between approved script hash and executed script hash
4. Monitor for unexpected child processes spawned by OpenClaw runtime user
5. Track failed file integrity checks and permission changes on script directories
6. Alert on OpenClaw process attempting to modify its own binary or configuration files
الإجراءات الفورية:
1. تحديد جميع عمليات نشر OpenClaw عبر البنية التحتية باستخدام أدوات اكتشاف الأصول
2. عزل مثيلات OpenClaw المتأثرة عن شبكات الإنتاج أو تنفيذ تقسيم شبكة صارم
3. مراجعة سجلات موافقة OpenClaw وسجل تنفيذ البرامج النصية للتعديلات المريبة
4. تنفيذ مراقبة سلامة الملفات (FIM) على جميع دلائل البرامج النصية
5. تفعيل تسجيل التدقيق الشامل لجميع أحداث الموافقة والتنفيذ
إرشادات التصحيح:
1. الترقية إلى OpenClaw الإصدار 2026.3.11 أو أحدث فوراً عند الإصدار
2. الاشتراك في إشعارات أمان OpenClaw
3. اختبار التصحيحات في بيئات معزولة قبل النشر
4. الحفاظ على إجراءات التراجع
الضوابط البديلة:
1. تنفيذ التوقيع التشفيري لجميع البرامج النصية المعتمدة
2. نشر أنظمة الملفات للقراءة فقط لدلائل البرامج النصية
3. تقييد امتيازات مستخدم وقت التشغيل
4. تنفيذ مراجعة الكود الإلزامية والموافقة المزدوجة
5. استخدام الحاويات مع طبقات الصور غير القابلة للتغيير
6. نشر قواعد جدار الحماية لاكتشاف محاولات تعديل البرامج النصية
قواعد الكشف:
1. مراقبة أحداث تعديل الملفات بين الموافقة والتنفيذ
2. تنبيهات على عمليات الكتابة غير المصرح بها
3. كشف التناقضات بين تجزئة البرنامج النصي المعتمد والمنفذ
4. مراقبة العمليات الفرعية غير المتوقعة
5. تتبع فشل فحوصات سلامة الملفات
6. تنبيهات على محاولات تعديل ملفات OpenClaw الثنائية