The MW WP Form plugin for WordPress is vulnerable to arbitrary file moving due to insufficient file path validation via the 'generate_user_filepath' function and the 'move_temp_file_to_upload_dir' function in all versions up to, and including, 5.1.0. This makes it possible for unauthenticated attackers to move arbitrary files on the server, which can easily lead to remote code execution when the right file is moved (such as wp-config.php). The vulnerability is only exploitable if a file upload field is added to the form and the “Saving inquiry data in database” option is enabled.
CVE-2026-4347 is a critical path traversal vulnerability in MW WP Form plugin (versions ≤5.1.0) allowing unauthenticated attackers to move arbitrary files on WordPress servers, potentially leading to remote code execution. The vulnerability requires a form with file upload capability and database storage enabled. With no patch currently available and no exploit publicly disclosed, organizations must implement immediate compensating controls to prevent exploitation.
IMMEDIATE ACTIONS:
1. Audit all WordPress installations for MW WP Form plugin presence and version (≤5.1.0)
2. Identify forms with file upload fields and 'Saving inquiry data in database' enabled
3. Disable the vulnerable plugin immediately or restrict access via .htaccess/.nginx rules
COMPENSATING CONTROLS (until patch available):
1. Implement Web Application Firewall (WAF) rules to block requests containing '../' or path traversal patterns to /wp-content/uploads/
2. Restrict file upload functionality at web server level using nginx/Apache configuration
3. Apply strict file permissions: chmod 755 for directories, 644 for files; ensure wp-config.php is not world-readable
4. Implement file integrity monitoring (FIM) on critical files (wp-config.php, .htaccess, wp-load.php)
5. Disable PHP execution in upload directories via .htaccess: 'php_flag engine off'
6. Use security plugins (Wordfence, Sucuri) to monitor file changes and block suspicious uploads
DETECTION RULES:
1. Monitor POST requests to form submission endpoints with suspicious file paths containing '../' or encoded variants (%2e%2e%2f)
2. Alert on file move operations outside designated upload directories
3. Log and alert on wp-config.php access or modification attempts
4. Monitor for unusual file creation in web root or parent directories
5. Track failed and successful file operations via WordPress debug logging
PATCHING STRATEGY:
1. Subscribe to MW WP Form security advisories for patch release
2. Prepare testing environment for plugin update immediately upon release
3. Consider alternative form plugins (WPForms, Gravity Forms, Formidable Forms) as interim solution
الإجراءات الفورية:
1. تدقيق جميع تثبيتات WordPress للتحقق من وجود إضافة MW WP Form والإصدار (≤5.1.0)
2. تحديد النماذج التي تحتوي على حقول تحميل الملفات وخيار 'حفظ بيانات الاستفسار في قاعدة البيانات' مفعل
3. تعطيل الإضافة الضعيفة فوراً أو تقييد الوصول عبر قواعد .htaccess/.nginx
الضوابط التعويضية (حتى توفر التصحيح):
1. تطبيق قواعد جدار حماية تطبيقات الويب (WAF) لحجب الطلبات التي تحتوي على '../' أو أنماط اجتياز المسارات
2. تقييد وظيفة تحميل الملفات على مستوى خادم الويب باستخدام إعدادات nginx/Apache
3. تطبيق أذونات ملفات صارمة: chmod 755 للمجلدات، 644 للملفات
4. تطبيق مراقبة سلامة الملفات (FIM) على الملفات الحرجة
5. تعطيل تنفيذ PHP في مجلدات التحميل عبر .htaccess
6. استخدام إضافات الأمان (Wordfence, Sucuri) لمراقبة التغييرات
قواعد الكشف:
1. مراقبة طلبات POST إلى نقاط نهاية النموذج التي تحتوي على مسارات ملفات مريبة
2. التنبيه على عمليات نقل الملفات خارج المجلدات المخصصة
3. تسجيل والتنبيه على محاولات الوصول أو التعديل على wp-config.php
4. مراقبة إنشاء ملفات غير عادية في جذر الويب
5. تتبع عمليات الملفات عبر تسجيل تصحيح WordPress