Laravel Ignition File Upload Vulnerability — Laravel Ignition contains a file upload vulnerability that allows unauthenticated remote attackers to execute malicious code due to insecure usage of file_get_contents() and file_put_contents().
CVE-2021-3129 is a critical unauthenticated remote code execution vulnerability in Laravel Ignition that allows attackers to upload and execute arbitrary code through insecure file handling functions. With a CVSS score of 9.0 and publicly available exploits, this poses an immediate threat to any organization running vulnerable Laravel applications. Immediate patching is essential as exploitation requires no authentication and can lead to complete system compromise.
IMMEDIATE ACTIONS:
1. Identify all Laravel Ignition installations in your environment using asset discovery tools
2. Take affected applications offline or restrict access to trusted networks only
3. Review web server logs for exploitation attempts (look for file upload requests to debug routes)
4. Check for suspicious files in storage directories and temporary upload locations
PATCHING:
1. Update Laravel Ignition to version 1.11.10 or later immediately
2. Run: composer update laravel/ignition
3. Clear application cache: php artisan cache:clear
4. Restart web services
COMPENSATING CONTROLS (if immediate patching not possible):
1. Disable Laravel Ignition in production environments (set APP_DEBUG=false)
2. Restrict access to debug routes using firewall rules or WAF
3. Implement IP whitelisting for debug endpoints
4. Deploy Web Application Firewall rules to block file upload attempts to debug routes
DETECTION:
1. Monitor for POST requests to /_ignition/ endpoints
2. Alert on file uploads to temporary directories from web processes
3. Search logs for 'file_get_contents' or 'file_put_contents' in debug output
4. Monitor for PHP execution in upload directories
الإجراءات الفورية:
1. تحديد جميع تثبيتات Laravel Ignition في بيئتك باستخدام أدوات اكتشاف الأصول
2. إيقاف التطبيقات المتأثرة أو تقييد الوصول إلى الشبكات الموثوقة فقط
3. مراجعة سجلات خادم الويب للبحث عن محاولات الاستغلال (ابحث عن طلبات تحميل الملفات إلى مسارات التصحيح)
4. التحقق من الملفات المريبة في مجلدات التخزين ومواقع التحميل المؤقتة
التصحيح:
1. تحديث Laravel Ignition إلى الإصدار 1.11.10 أو أحدث فوراً
2. تشغيل: composer update laravel/ignition
3. مسح ذاكرة التطبيق: php artisan cache:clear
4. إعادة تشغيل خدمات الويب
الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
1. تعطيل Laravel Ignition في بيئات الإنتاج (تعيين APP_DEBUG=false)
2. تقييد الوصول إلى مسارات التصحيح باستخدام قواعد جدار الحماية أو WAF
3. تطبيق قائمة بيضاء للعناوين IP لنقاط نهاية التصحيح
4. نشر قواعد جدار تطبيقات الويب لحظر محاولات تحميل الملفات إلى مسارات التصحيح
الكشف:
1. مراقبة طلبات POST إلى نقاط نهاية /_ignition/
2. تنبيه عند تحميل الملفات إلى المجلدات المؤقتة من عمليات الويب
3. البحث في السجلات عن 'file_get_contents' أو 'file_put_contents' في مخرجات التصحيح
4. مراقبة تنفيذ PHP في مجلدات التحميل