Simple Fields 0.2 through 0.3.5 WordPress Plugin contains a local file inclusion vulnerability that allows unauthenticated attackers to read arbitrary files by injecting null bytes into the wp_abspath parameter on PHP versions before 5.3.4. Attackers can supply malicious wp_abspath values to simple_fields.php to include files like /etc/passwd or inject PHP code into Apache logs for remote code execution when allow_url_include is enabled.
Simple Fields WordPress plugin versions 0.2-0.3.5 contain a local file inclusion (LFI) vulnerability allowing unauthenticated attackers to read arbitrary files via null byte injection on legacy PHP versions. On systems with allow_url_include enabled, attackers can achieve remote code execution by injecting malicious code into Apache logs. This vulnerability affects WordPress installations using outdated plugin versions and PHP versions before 5.3.4.
Immediate Actions:
1. Audit all WordPress installations for Simple Fields plugin presence and version (check wp-content/plugins/simple-fields/simple-fields.php)
2. Identify PHP version on affected servers (php -v) — systems running PHP 5.3.4+ are partially protected from null byte injection
3. Check PHP configuration for allow_url_include setting (grep allow_url_include /etc/php.ini) — disable if enabled
Patching Guidance:
1. Deactivate and remove Simple Fields plugin immediately (no patch available for this version)
2. Migrate to alternative field management plugins (ACF, Pods, or native WordPress custom fields)
3. If plugin removal is not immediately possible, implement Web Application Firewall (WAF) rules to block requests containing null bytes (%00) in wp_abspath parameter
Compensating Controls:
1. Restrict access to simple_fields.php via .htaccess: <FilesMatch "simple_fields\.php"> Deny from all </FilesMatch>
2. Disable allow_url_include in php.ini: allow_url_include = Off
3. Implement file integrity monitoring on /etc/passwd and Apache log directories
4. Deploy ModSecurity rules to detect LFI patterns in wp_abspath parameters
5. Restrict file permissions on Apache log directories (chmod 750)
Detection Rules:
1. Monitor access logs for requests containing %00 or null bytes in wp_abspath parameter
2. Alert on any access to simple_fields.php from non-administrative IPs
3. Monitor for unusual file inclusion patterns in web server logs
4. Check for suspicious PHP execution in Apache log directories
الإجراءات الفورية:
1. تدقيق جميع تثبيتات WordPress للتحقق من وجود إضافة Simple Fields والإصدار (تحقق من wp-content/plugins/simple-fields/simple-fields.php)
2. تحديد إصدار PHP على الخوادم المتأثرة (php -v) — الأنظمة التي تعمل بـ PHP 5.3.4+ محمية جزئياً من حقن البايت الفارغ
3. التحقق من إعدادات PHP لـ allow_url_include (grep allow_url_include /etc/php.ini) — تعطيلها إن كانت مفعلة
إرشادات التصحيح:
1. تعطيل وإزالة إضافة Simple Fields فوراً (لا يوجد تصحيح متاح لهذا الإصدار)
2. الترقية إلى إضافات إدارة حقول بديلة (ACF أو Pods أو حقول WordPress المخصصة)
3. إذا لم يكن من الممكن إزالة الإضافة فوراً، تطبيق قواعد جدار حماية تطبيقات الويب لحجب الطلبات التي تحتوي على بايتات فارغة (%00) في معامل wp_abspath
الضوابط التعويضية:
1. تقييد الوصول إلى simple_fields.php عبر .htaccess
2. تعطيل allow_url_include في php.ini
3. تطبيق مراقبة سلامة الملفات على /etc/passwd وأدلة سجلات Apache
4. نشر قواعد ModSecurity للكشف عن أنماط LFI
5. تقييد أذونات الملفات على أدلة سجلات Apache
قواعد الكشف:
1. مراقبة سجلات الوصول للطلبات التي تحتوي على %00 أو بايتات فارغة في معامل wp_abspath
2. تنبيهات على أي وصول إلى simple_fields.php من عناوين IP غير إدارية
3. مراقبة أنماط تضمين الملفات غير العادية في سجلات خادم الويب
4. التحقق من تنفيذ PHP المريب في أدلة سجلات Apache