Cockpit CMS contains an authenticated remote code execution vulnerability in the /cockpit/collections/save_collection endpoint that allows authenticated attackers with collection management privileges to inject arbitrary PHP code into collection rules parameters. Attackers can inject malicious PHP code through rule parameters which is written directly to server-side PHP files and executed via include() to achieve arbitrary command execution on the underlying server.
Cockpit CMS contains a critical authenticated remote code execution vulnerability (CVE-2026-34965) in the collection management endpoint that allows privileged users to inject arbitrary PHP code through rule parameters. The vulnerability exploits unsafe file writing and include() execution, enabling complete server compromise. With a CVSS score of 8.8 and no patch currently available, this poses an immediate threat to organizations using Cockpit CMS for content management.
IMMEDIATE ACTIONS:
1. Audit all Cockpit CMS installations in your environment and identify instances with collection management functionality enabled
2. Review access logs for the /cockpit/collections/save_collection endpoint for suspicious activity, particularly from administrative accounts
3. Restrict collection management privileges to only essential personnel and implement principle of least privilege
4. Disable Cockpit CMS collection management features if not actively required
COMPENSATING CONTROLS (until patch available):
5. Implement Web Application Firewall (WAF) rules to block requests to /cockpit/collections/save_collection endpoint containing PHP code patterns (<?php, eval, system, exec, passthru, shell_exec)
6. Apply strict input validation and sanitization on all rule parameters—reject any input containing PHP tags or suspicious function calls
7. Implement file integrity monitoring (FIM) on Cockpit configuration and rule files to detect unauthorized modifications
8. Restrict file write permissions on Cockpit directories to read-only where possible
9. Disable PHP execution in Cockpit configuration directories via .htaccess or web server configuration
10. Implement network segmentation to limit administrative access to Cockpit to trusted networks only
11. Enable detailed logging and alerting for collection management operations
12. Monitor for suspicious include() or require() statements in PHP error logs
DETECTION RULES:
- Alert on POST requests to /cockpit/collections/save_collection with payloads containing: '<?', 'eval(', 'system(', 'exec(', 'passthru(', 'shell_exec(', 'proc_open(', 'popen('
- Monitor for file modifications in Cockpit rule/config directories outside of normal deployment windows
- Alert on execution of unexpected PHP files in Cockpit directories
- Track failed and successful authentication attempts to Cockpit administrative interfaces
الإجراءات الفورية:
1. قم بمراجعة جميع تثبيتات Cockpit CMS في بيئتك وحدد الحالات التي تحتوي على وظائف إدارة المجموعات المفعلة
2. راجع سجلات الوصول لنقطة النهاية /cockpit/collections/save_collection بحثاً عن نشاط مريب، خاصة من الحسابات الإدارية
3. قيّد امتيازات إدارة المجموعات للموظفين الأساسيين فقط وطبّق مبدأ أقل امتياز
4. عطّل وظائف إدارة مجموعات Cockpit إذا لم تكن مطلوبة بنشاط
الضوابط التعويضية (حتى توفر التصحيح):
5. طبّق قواعد جدار حماية تطبيقات الويب (WAF) لحجب الطلبات إلى نقطة النهاية /cockpit/collections/save_collection التي تحتوي على أنماط أكواد PHP (<?php, eval, system, exec, passthru, shell_exec)
6. طبّق التحقق من صحة الإدخال والتنظيف الصارم على جميع معاملات القواعد—رفض أي إدخال يحتوي على علامات PHP أو استدعاءات دوال مريبة
7. طبّق مراقبة سلامة الملفات (FIM) على ملفات تكوين وقواعد Cockpit للكشف عن التعديلات غير المصرح بها
8. قيّد أذونات كتابة الملفات في دلائل Cockpit إلى القراءة فقط حيث أمكن
9. عطّل تنفيذ PHP في دلائل تكوين Cockpit عبر .htaccess أو إعدادات خادم الويب
10. طبّق تقسيم الشبكة لتحديد الوصول الإداري إلى Cockpit للشبكات الموثوقة فقط
11. فعّل التسجيل والتنبيهات التفصيلية لعمليات إدارة المجموعات
12. راقب استخدام include() أو require() المريب في سجلات أخطاء PHP
قواعد الكشف:
- تنبيه على طلبات POST إلى /cockpit/collections/save_collection مع حمولات تحتوي على: '<?', 'eval(', 'system(', 'exec(', 'passthru(', 'shell_exec(', 'proc_open(', 'popen('
- راقب تعديلات الملفات في دلائل قواعد/تكوين Cockpit خارج نوافذ النشر العادية
- تنبيه على تنفيذ ملفات PHP غير متوقعة في دلائل Cockpit
- تتبع محاولات المصادقة الفاشلة والناجحة لواجهات Cockpit الإدارية