Dolibarr is an enterprise resource planning (ERP) and customer relationship management (CRM) software package. Versions 22.0.2 and earlier contains an authenticated remote code execution vulnerability in the user extrafields functionality. User-controlled input from the "computed value" field is passed to PHP's `eval()` function without adequate sanitization, allowing authenticated administrators to execute arbitrary PHP code on the server. As of time of publication, no patched versions are available.
Dolibarr ERP/CRM versions 22.0.2 and earlier contain an authenticated remote code execution vulnerability in the user extrafields functionality where unsanitized input is passed directly to PHP's eval() function. This allows authenticated administrators to execute arbitrary PHP code on the server. With exploit code publicly available and no patched versions released at publication time, this poses an immediate threat to organizations using Dolibarr for critical business operations.
IMMEDIATE ACTIONS:
1. Identify all instances of Dolibarr ERP/CRM in your organization and document version numbers
2. Restrict administrative access to Dolibarr to only essential personnel with strong authentication (MFA if possible)
3. Review audit logs for any suspicious activity in the extrafields module, particularly any modifications to computed value fields
4. Implement network segmentation to isolate Dolibarr servers from critical systems
5. Enable detailed logging of all administrative actions within Dolibarr
PATCHING GUIDANCE:
1. Monitor the official Dolibarr GitHub repository and security advisories for patched versions (versions 23.0.0 or later when available)
2. Test patches in a non-production environment before deployment
3. Plan immediate deployment of patches upon availability
4. If running version 22.0.2 or earlier, prioritize upgrade planning
COMPENSATING CONTROLS (if patch unavailable):
1. Disable or restrict access to the extrafields functionality at the application level
2. Implement Web Application Firewall (WAF) rules to detect and block eval() function calls in POST requests to extrafields endpoints
3. Use PHP configuration to disable eval() function if not required for other applications (php.ini: disable_functions = eval)
4. Implement strict input validation and output encoding at the application level
5. Deploy intrusion detection signatures monitoring for suspicious PHP execution patterns
DETECTION RULES:
1. Monitor for POST requests to /admin/user_extrafields.php or similar endpoints with suspicious payloads
2. Alert on any PHP code patterns in the 'computed value' field (look for: system(), exec(), shell_exec(), passthru(), eval())
3. Monitor PHP error logs for unexpected code execution attempts
4. Track changes to extrafields configuration by administrators
5. Monitor for unusual process spawning from PHP processes running Dolibarr
الإجراءات الفورية:
1. حدد جميع نسخ Dolibarr ERP/CRM في مؤسستك وقم بتوثيق أرقام الإصدارات
2. قيد الوصول الإداري إلى Dolibarr للموظفين الأساسيين فقط مع المصادقة القوية (MFA إن أمكن)
3. راجع سجلات التدقيق للنشاط المريب في وحدة الحقول الإضافية، خاصة أي تعديلات على حقول القيمة المحسوبة
4. طبق تقسيم الشبكة لعزل خوادم Dolibarr عن الأنظمة الحرجة
5. فعّل التسجيل التفصيلي لجميع الإجراءات الإدارية داخل Dolibarr
إرشادات التصحيح:
1. راقب مستودع Dolibarr الرسمي على GitHub والتنبيهات الأمنية للإصدارات المصححة (الإصدار 23.0.0 أو أحدث عند توفره)
2. اختبر التصحيحات في بيئة غير إنتاجية قبل النشر
3. خطط للنشر الفوري للتصحيحات عند توفره
4. إذا كنت تقوم بتشغيل الإصدار 22.0.2 أو أقدم، فأولويتك هي تخطيط الترقية
الضوابط البديلة (إذا لم يكن التصحيح متاحاً):
1. عطّل أو قيد الوصول إلى وظيفة الحقول الإضافية على مستوى التطبيق
2. طبق قواعد جدار حماية تطبيقات الويب (WAF) للكشف عن استدعاءات دالة eval() وحجبها في طلبات POST إلى نقاط نهاية الحقول الإضافية
3. استخدم تكوين PHP لتعطيل دالة eval() إذا لم تكن مطلوبة لتطبيقات أخرى (php.ini: disable_functions = eval)
4. طبق التحقق من صحة المدخلات الصارمة وترميز المخرجات على مستوى التطبيق
5. نشّر توقيعات كشف الاختراق لمراقبة أنماط تنفيذ PHP المريبة
قواعد الكشف:
1. راقب طلبات POST إلى /admin/user_extrafields.php أو نقاط نهاية مماثلة مع حمولات مريبة
2. أصدر تنبيهات على أي أنماط كود PHP في حقل 'القيمة المحسوبة' (ابحث عن: system()، exec()، shell_exec()، passthru()، eval())
3. راقب سجلات أخطاء PHP لمحاولات تنفيذ الكود غير المتوقعة
4. تتبع التغييرات على تكوين الحقول الإضافية من قبل المسؤولين
5. راقب توليد العمليات غير العادية من عمليات PHP التي تقوم بتشغيل Dolibarr