OpenClaw before 2026.3.31 lacks browser-origin validation in HTTP operator endpoints when operating in trusted-proxy mode, allowing cross-site request forgery attacks. Attackers can exploit this by sending malicious requests from a browser in trusted-proxy deployments to perform unauthorized actions on HTTP operator endpoints.
OpenClaw versions before 2026.3.31 contain a critical CSRF vulnerability in HTTP operator endpoints when deployed in trusted-proxy mode, lacking proper browser-origin validation. This allows attackers to forge requests from compromised browsers to perform unauthorized actions on operator endpoints. While no public exploit exists, the vulnerability poses significant risk to organizations using OpenClaw in trusted-proxy configurations, particularly those managing critical infrastructure or financial systems.
Immediate Actions:
1. Identify all OpenClaw deployments operating in trusted-proxy mode across your infrastructure
2. Implement network-level CSRF protections: deploy WAF rules to validate Origin and Referer headers on HTTP operator endpoints
3. Restrict access to operator endpoints to internal networks only; disable external access if not required
4. Enable detailed logging of all requests to operator endpoints for forensic analysis
Patching Guidance:
5. Upgrade OpenClaw to version 2026.3.31 or later immediately when available
6. If upgrade is not immediately possible, apply compensating controls (see below)
Compensating Controls (if patch unavailable):
7. Implement SameSite cookie attributes (Strict or Lax) on all session cookies
8. Deploy CSRF tokens on all state-changing operations in operator endpoints
9. Require multi-factor authentication for operator endpoint access
10. Implement IP whitelisting for operator endpoint access
Detection Rules:
11. Monitor for requests to operator endpoints with missing or invalid Origin/Referer headers
12. Alert on operator endpoint requests originating from external domains
13. Track unusual patterns in operator endpoint access (timing, source IPs, user agents)
14. Implement SIEM rules to detect CSRF attack patterns (cross-origin requests to sensitive endpoints)
الإجراءات الفورية:
1. حدد جميع نشرات OpenClaw التي تعمل في وضع الوكيل الموثوق عبر البنية التحتية الخاصة بك
2. تنفيذ حماية CSRF على مستوى الشبكة: نشر قواعد WAF للتحقق من رؤوس Origin و Referer على نقاط نهاية مشغل HTTP
3. تقييد الوصول إلى نقاط نهاية المشغل للشبكات الداخلية فقط؛ تعطيل الوصول الخارجي إذا لم يكن مطلوباً
4. تفعيل تسجيل مفصل لجميع الطلبات إلى نقاط نهاية المشغل للتحليل الجنائي
إرشادات التصحيح:
5. ترقية OpenClaw إلى الإصدار 2026.3.31 أو أحدث فوراً عند توفره
6. إذا لم يكن الترقية ممكنة على الفور، طبق عناصر تحكم تعويضية (انظر أدناه)
عناصر التحكم التعويضية (إذا لم يكن التصحيح متاحاً):
7. تنفيذ سمات ملفات تعريف الارتباط SameSite (Strict أو Lax) على جميع ملفات تعريف الجلسة
8. نشر رموز CSRF على جميع العمليات التي تغير الحالة في نقاط نهاية المشغل
9. طلب المصادقة متعددة العوامل للوصول إلى نقاط نهاية المشغل
10. تنفيذ القائمة البيضاء للعناوين IP للوصول إلى نقاط نهاية المشغل
قواعد الكشف:
11. مراقبة الطلبات إلى نقاط نهاية المشغل مع رؤوس Origin/Referer المفقودة أو غير الصحيحة
12. تنبيه الطلبات إلى نقاط نهاية المشغل من النطاقات الخارجية
13. تتبع الأنماط غير العادية في الوصول إلى نقاط نهاية المشغل (التوقيت وعناوين IP المصدر ووكلاء المستخدم)
14. تنفيذ قواعد SIEM للكشف عن أنماط هجوم CSRF (الطلبات عبر الأصول إلى نقاط النهاية الحساسة)