GUnet OpenEclass 1.7.3 allows authenticated users to bypass file extension restrictions when uploading files. By renaming a PHP file to .php3 or .PhP, an attacker can upload a web shell and execute arbitrary code on the server. This vulnerability enables remote code execution by bypassing the intended file type checks in the exercise submission feature.
CVE-2020-37113 is a critical file upload vulnerability in GUnet OpenEclass 1.7.3 that allows authenticated users to bypass file extension restrictions and upload PHP web shells by using alternate extensions (.php3, .PhP). This enables remote code execution on affected servers. The vulnerability poses significant risk to educational institutions and organizations using this learning management system, particularly given the availability of working exploits.
IMMEDIATE ACTIONS:
1. Identify all instances of GUnet OpenEclass 1.7.3 in your environment using network scanning and asset inventory tools
2. Restrict access to the exercise submission feature to trusted users only
3. Implement Web Application Firewall (WAF) rules to block uploads with extensions: .php, .php3, .php4, .php5, .phtml, .PhP, .pHp, etc.
4. Monitor web server logs for suspicious file uploads and execution attempts
PATCHING:
5. Upgrade immediately to GUnet OpenEclass 1.7.4 or later version that implements proper file type validation
6. Verify patch deployment across all instances before re-enabling file upload features
COMPENSATING CONTROLS (if immediate patching not possible):
7. Disable PHP execution in upload directories via web server configuration (.htaccess or nginx config)
8. Implement strict file type validation on both client and server side using MIME type checking and magic bytes verification
9. Store uploaded files outside web root directory
10. Rename uploaded files to remove original extensions
DETECTION:
11. Deploy IDS/IPS signatures to detect .php3, .phtml, .PhP file uploads
12. Monitor for POST requests to exercise submission endpoints with suspicious file extensions
13. Alert on any PHP execution from upload directories
14. Review access logs for authenticated users uploading files with double extensions or case-variation extensions
الإجراءات الفورية:
1. تحديد جميع نسخ GUnet OpenEclass 1.7.3 في بيئتك باستخدام أدوات المسح والجرد
2. تقييد الوصول إلى ميزة تقديم التمارين للمستخدمين الموثوقين فقط
3. تطبيق قواعد جدار حماية تطبيقات الويب لحجب التحميلات بامتدادات: .php, .php3, .php4, .php5, .phtml, .PhP, .pHp، وغيرها
4. مراقبة سجلات خادم الويب للتحميلات والمحاولات المريبة
التصحيح:
5. الترقية فوراً إلى GUnet OpenEclass 1.7.4 أو إصدار أحدث يطبق التحقق الصحيح من نوع الملف
6. التحقق من نشر التصحيح عبر جميع النسخ قبل إعادة تفعيل ميزات تحميل الملفات
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
7. تعطيل تنفيذ PHP في مجلدات التحميل عبر إعدادات خادم الويب
8. تطبيق التحقق الصارم من نوع الملف على جانب العميل والخادم باستخدام التحقق من نوع MIME
9. تخزين الملفات المحملة خارج جذر الويب
10. إعادة تسمية الملفات المحملة لإزالة الامتدادات الأصلية
الكشف:
11. نشر توقيعات IDS/IPS للكشف عن تحميلات .php3 و .phtml و .PhP
12. مراقبة طلبات POST إلى نقاط نهاية تقديم التمارين بامتدادات ملفات مريبة
13. التنبيه على أي تنفيذ PHP من مجلدات التحميل
14. مراجعة سجلات الوصول للمستخدمين المصرحين الذين يحملون ملفات بامتدادات مزدوجة أو متغيرة الحالة