The Drag and Drop Multiple File Upload for Contact Form 7 plugin for WordPress is vulnerable to arbitrary file upload in versions up to, and including, 1.3.9.6. This is due to insufficient file type validation that occurs when custom blacklist types are configured, which replaces the default dangerous extension denylist instead of merging with it, and the wpcf7_antiscript_file_name() sanitization function being bypassed for filenames containing non-ASCII characters. This makes it possible for unauthenticated attackers to upload arbitrary files, such as PHP files, to the server, which can be leveraged to achieve remote code execution.
CVE-2026-5718 is a critical arbitrary file upload vulnerability in the Drag and Drop Multiple File Upload for Contact Form 7 WordPress plugin (versions ≤1.3.9.6) that allows unauthenticated attackers to upload malicious files including PHP executables, leading to remote code execution. The vulnerability stems from insufficient file type validation when custom blacklists are configured and a bypass of sanitization for non-ASCII filenames. With no patch currently available, this poses an immediate threat to WordPress installations using this plugin, particularly those exposed to the internet.
IMMEDIATE ACTIONS:
1. Disable the Drag and Drop Multiple File Upload for Contact Form 7 plugin immediately if not critical to operations
2. If plugin is essential, restrict access to Contact Form 7 pages using IP whitelisting or authentication requirements
3. Review server logs and file uploads directory for suspicious PHP files or executables uploaded in recent weeks
4. Check web server access logs for POST requests to form submission endpoints
COMPENSATING CONTROLS (until patch available):
1. Implement strict file upload restrictions at web server level (Apache/Nginx):
- Disable PHP execution in upload directories via .htaccess or nginx config
- Restrict uploaded file extensions to whitelist only (pdf, jpg, png, doc)
- Set proper file permissions (644 for files, 755 for directories)
2. Configure Web Application Firewall (WAF) rules to block uploads with double extensions or null bytes
3. Implement Content Security Policy (CSP) headers to prevent execution of uploaded scripts
4. Use alternative Contact Form 7 extensions without file upload functionality
DETECTION RULES:
1. Monitor for POST requests to wp-admin/admin-ajax.php with wpcf7 parameters containing file uploads
2. Alert on PHP file creation in wp-content/uploads/ directory
3. Monitor for non-ASCII characters in uploaded filenames
4. Track failed file type validations in plugin logs
5. Search for recently modified PHP files in upload directories
PATCHING STRATEGY:
1. Monitor plugin repository for security update (expected imminently given CVE publication)
2. Subscribe to WordPress security mailing lists
3. Test patch in staging environment before production deployment
4. Plan immediate update deployment once patch is released
الإجراءات الفورية:
1. قم بتعطيل إضافة Drag and Drop Multiple File Upload for Contact Form 7 فوراً إذا لم تكن حرجة للعمليات
2. إذا كانت الإضافة ضرورية، قيد الوصول إلى صفحات Contact Form 7 باستخدام القائمة البيضاء للعناوين أو متطلبات المصادقة
3. راجع سجلات الخادم ومجلد التحميلات بحثاً عن ملفات PHP أو ملفات قابلة للتنفيذ مريبة تم تحميلها في الأسابيع الأخيرة
4. تحقق من سجلات الوصول لخادم الويب للطلبات POST إلى نقاط نهاية تقديم النموذج
الضوابط التعويضية (حتى توفر التصحيح):
1. تطبيق قيود صارمة على تحميل الملفات على مستوى خادم الويب:
- تعطيل تنفيذ PHP في مجلدات التحميل عبر .htaccess أو إعدادات nginx
- تقييد امتدادات الملفات المرفوعة إلى قائمة بيضاء فقط (pdf, jpg, png, doc)
- تعيين أذونات الملفات الصحيحة (644 للملفات، 755 للمجلدات)
2. تكوين قواعد جدار الحماية (WAF) لحظر التحميلات بامتدادات مزدوجة أو بايتات فارغة
3. تطبيق رؤوس سياسة أمان المحتوى (CSP) لمنع تنفيذ البرامج النصية المرفوعة
4. استخدام بدائل Contact Form 7 بدون وظيفة تحميل الملفات
قواعد الكشف:
1. مراقبة طلبات POST إلى wp-admin/admin-ajax.php مع معاملات wpcf7 تحتوي على تحميلات ملفات
2. تنبيه عند إنشاء ملف PHP في مجلد wp-content/uploads/
3. مراقبة الأحرف غير ASCII في أسماء الملفات المرفوعة
4. تتبع فشل التحقق من نوع الملف في سجلات الإضافة
5. البحث عن ملفات PHP المعدلة مؤخراً في مجلدات التحميل
استراتيجية التصحيح:
1. مراقبة مستودع الإضافة للتحديث الأمني (متوقع قريباً جداً)
2. الاشتراك في قوائم البريد الأمنية لـ WordPress
3. اختبار التصحيح في بيئة التطوير قبل النشر في الإنتاج
4. التخطيط لنشر التحديث الفوري بمجرد إصدار التصحيح