The WP FOFT Loader plugin for WordPress is vulnerable to arbitrary file uploads due to incorrect file type validation in the 'WP_FOFT_Loader_Mimes::file_and_ext' function in all versions up to, and including, 2.1.39. This makes it possible for authenticated attackers, with Author-level access and above, to upload arbitrary files on the affected site's server which may make remote code execution possible.
The WP FOFT Loader WordPress plugin (versions ≤2.1.39) contains a critical arbitrary file upload vulnerability allowing authenticated users with Author-level privileges to bypass file type validation and upload malicious files, potentially enabling remote code execution. This vulnerability affects WordPress installations across Saudi Arabia's government, banking, and commercial sectors. Immediate patching to version 2.1.40 or later is essential to prevent unauthorized code execution and data compromise.
IMMEDIATE ACTIONS:
1. Identify all WordPress installations using WP FOFT Loader plugin by scanning plugin directories and WordPress admin dashboards
2. Audit user accounts with Author-level access or above; review recent file uploads for suspicious content
3. Review web server logs (Apache/Nginx access logs) for unusual POST requests to wp-admin/upload.php or plugin upload endpoints
PATCHING GUIDANCE:
1. Update WP FOFT Loader plugin to version 2.1.40 or later immediately
2. If immediate patching is not possible, disable the plugin until patched
3. Test updates in staging environment before production deployment
COMPENSATING CONTROLS (if patching delayed):
1. Restrict Author-level access to only trusted personnel; audit and remove unnecessary accounts
2. Implement Web Application Firewall (WAF) rules to block file uploads with executable extensions (.php, .phtml, .php3, .php4, .php5, .phar, .exe, .sh, .bat)
3. Configure web server to prevent execution of scripts in upload directories via .htaccess or nginx configuration
4. Enable WordPress security plugins (Wordfence, Sucuri) with file integrity monitoring
5. Implement file upload restrictions at the web server level
DETECTION RULES:
1. Monitor for POST requests to /wp-admin/upload.php with Content-Type mismatches
2. Alert on file uploads with double extensions (.php.jpg, .jpg.php)
3. Monitor wp-content/uploads directory for newly created executable files
4. Track failed MIME type validations in WordPress debug logs
5. Monitor for suspicious file access patterns in upload directories
الإجراءات الفورية:
1. تحديد جميع تثبيتات WordPress التي تستخدم مكون WP FOFT Loader من خلال مسح مجلدات المكونات ولوحات تحكم WordPress
2. تدقيق حسابات المستخدمين بمستوى المؤلف أو أعلى؛ مراجعة عمليات التحميل الأخيرة للمحتوى المريب
3. مراجعة سجلات خادم الويب (سجلات Apache/Nginx) للطلبات POST غير العادية إلى wp-admin/upload.php أو نقاط نهاية تحميل المكونات
إرشادات التصحيح:
1. تحديث مكون WP FOFT Loader إلى الإصدار 2.1.40 أو أحدث على الفور
2. إذا لم يكن التحديث الفوري ممكنًا، قم بتعطيل المكون حتى يتم تصحيحه
3. اختبر التحديثات في بيئة التدريج قبل نشرها في الإنتاج
الضوابط البديلة (إذا تأخر التصحيح):
1. تقييد الوصول على مستوى المؤلف للموظفين الموثوقين فقط؛ تدقيق وإزالة الحسابات غير الضرورية
2. تنفيذ قواعد جدار حماية تطبيقات الويب (WAF) لحظر تحميل الملفات بامتدادات قابلة للتنفيذ
3. تكوين خادم الويب لمنع تنفيذ البرامج النصية في مجلدات التحميل
4. تفعيل مكونات أمان WordPress مع مراقبة سلامة الملفات
5. تنفيذ قيود تحميل الملفات على مستوى خادم الويب
قواعد الكشف:
1. مراقبة طلبات POST إلى /wp-admin/upload.php مع عدم تطابق نوع المحتوى
2. التنبيه على تحميل الملفات بامتدادات مزدوجة
3. مراقبة مجلد wp-content/uploads للملفات القابلة للتنفيذ المنشأة حديثًا
4. تتبع فشل التحقق من نوع MIME في سجلات تصحيح WordPress
5. مراقبة أنماط الوصول إلى الملفات المريبة في مجلدات التحميل