The WP Captcha PRO (the premium version of the Advanced Google reCAPTCHA plugin, both have the same slug) plugin for WordPress is vulnerable to arbitrary file upload in all versions up to, and including, 5.38. This is due to a capability check in the save_ajax() function of the licensing module, combined with unrestricted file extraction in sync_cloud_protection(). This makes it possible for authenticated attackers, with Subscriber-level access and above, to upload arbitrary files including PHP webshells to the server by injecting a malicious cloud_protection_url into the license meta, which the plugin then downloads and extracts without file type validation into a web-accessible uploads directory. This can be used for remote code execution. Note: The vulnerability can only be exploited with a remote URL if "allow_url_fopen" is enabled in the php.ini config.
WP Captcha PRO plugin versions up to 5.38 contain a critical arbitrary file upload vulnerability allowing authenticated Subscriber-level users to upload malicious PHP webshells via improper capability checks and unrestricted file extraction. This enables remote code execution on WordPress installations, posing severe risk to Saudi organizations relying on WordPress for web presence. No patch is currently available, requiring immediate mitigation through plugin disablement or access controls.
IMMEDIATE ACTIONS:
1. Disable or deactivate the WP Captcha PRO plugin immediately across all WordPress installations
2. Audit WordPress user accounts and remove unnecessary Subscriber-level accounts
3. Review web server logs and file system for suspicious PHP files in wp-content/uploads directory
4. Check for unauthorized file modifications and webshell indicators (unusual .php files, suspicious file timestamps)
COMPENSATING CONTROLS:
1. Restrict file upload capabilities at web server level (disable PHP execution in uploads directory via .htaccess or nginx config)
2. Implement strict file type validation at web server level
3. Enable PHP security setting: set allow_url_fopen = Off in php.ini
4. Implement Web Application Firewall (WAF) rules to block suspicious file uploads
5. Enforce strong authentication and limit Subscriber account creation
6. Deploy file integrity monitoring on wp-content/uploads directory
DETECTION RULES:
1. Monitor for POST requests to wp-admin/admin-ajax.php with action=save_ajax from Subscriber accounts
2. Alert on .php file creation in wp-content/uploads directory
3. Monitor for suspicious cloud_protection_url parameters in license meta
4. Track failed and successful file extraction operations
5. Monitor for unusual process execution from web server user context
PATCHING:
1. Monitor plugin repository for security update (currently unavailable)
2. Consider alternative CAPTCHA solutions (Google reCAPTCHA v3, hCaptcha, Cloudflare Turnstile)
3. If plugin is critical, implement custom capability checks and file validation patches if internal development resources available
الإجراءات الفورية:
1. تعطيل أو إلغاء تفعيل مكون WP Captcha PRO فوراً عبر جميع تثبيتات WordPress
2. تدقيق حسابات مستخدمي WordPress وإزالة حسابات المشتركين غير الضرورية
3. مراجعة سجلات خادم الويب والنظام الملفي للملفات PHP المريبة في مجلد wp-content/uploads
4. التحقق من التعديلات غير المصرح بها ومؤشرات أصداف الويب
ضوابط التعويض:
1. تقييد قدرات تحميل الملفات على مستوى خادم الويب (تعطيل تنفيذ PHP في مجلد التحميلات)
2. تنفيذ التحقق الصارم من نوع الملف على مستوى خادم الويب
3. تفعيل إعداد أمان PHP: تعيين allow_url_fopen = Off في php.ini
4. تنفيذ قواعد جدار حماية تطبيقات الويب لحظر تحميلات الملفات المريبة
5. فرض المصادقة القوية وتحديد إنشاء حسابات المشتركين
6. نشر مراقبة سلامة الملفات على مجلد wp-content/uploads
قواعد الكشف:
1. مراقبة طلبات POST إلى wp-admin/admin-ajax.php مع action=save_ajax من حسابات المشتركين
2. التنبيه عند إنشاء ملفات .php في مجلد wp-content/uploads
3. مراقبة معاملات cloud_protection_url المريبة في بيانات الترخيص
4. تتبع عمليات استخراج الملفات الفاشلة والناجحة
5. مراقبة تنفيذ العمليات غير العادية من سياق مستخدم خادم الويب