Nginx UI is a web user interface for the Nginx web server. Prior to version 2.3.4, the nginx-ui configuration improperly handles URL-encoded traversal sequences. When specially crafted paths are supplied, the backend resolves them to the base Nginx configuration directory and executes the operation on the base directory (/etc/nginx). In particular, this allows an authenticated user to remove the entire /etc/nginx directory, resulting in a partial Denial of Service. This issue has been patched in version 2.3.4.
Nginx UI versions prior to 2.3.4 contain a path traversal vulnerability (CWE-22) that allows authenticated users to manipulate URL-encoded sequences and access the base Nginx configuration directory (/etc/nginx). An attacker could delete the entire Nginx configuration directory, causing partial denial of service. While requiring authentication, the vulnerability poses significant risk to organizations using Nginx UI for web server management, particularly in critical infrastructure environments.
IMMEDIATE ACTIONS:
1. Audit all Nginx UI deployments in your environment and document version numbers
2. Restrict access to Nginx UI administrative interfaces using network segmentation and WAF rules
3. Implement strict RBAC to limit authenticated user privileges to minimum necessary permissions
4. Enable comprehensive audit logging for all Nginx UI configuration changes
5. Monitor /etc/nginx directory for unauthorized modifications using file integrity monitoring (FIM)
PATCHING GUIDANCE:
1. Upgrade Nginx UI to version 2.3.4 or later immediately upon availability
2. If patch unavailable, implement compensating controls (see below)
3. Test patches in non-production environments before deployment
COMPENSATING CONTROLS (if patch unavailable):
1. Deploy Web Application Firewall (WAF) rules to block URL-encoded traversal sequences (%2e%2e, ../, etc.)
2. Implement input validation at application layer to reject path traversal attempts
3. Run Nginx UI with minimal privileges (non-root user with restricted filesystem permissions)
4. Use AppArmor or SELinux profiles to restrict Nginx UI process access to /etc/nginx
5. Implement network-level access controls limiting Nginx UI access to authorized administrators only
DETECTION RULES:
1. Monitor HTTP requests to Nginx UI containing URL-encoded sequences: %2e, %2f, %5c
2. Alert on any DELETE or modification requests targeting paths containing traversal patterns
3. Monitor /etc/nginx directory for unexpected deletions or modifications
4. Track failed authentication attempts followed by successful access
5. Log all configuration changes with source IP and user identity
الإجراءات الفورية:
1. تدقيق جميع نشرات Nginx UI في بيئتك وتوثيق أرقام الإصدارات
2. تقييد الوصول إلى واجهات إدارة Nginx UI باستخدام تقسيم الشبكة وقواعد جدار الحماية
3. تنفيذ التحكم في الوصول القائم على الأدوار (RBAC) لتحديد امتيازات المستخدم المصرح له
4. تفعيل تسجيل التدقيق الشامل لجميع تغييرات إعدادات Nginx UI
5. مراقبة دليل /etc/nginx للتعديلات غير المصرح بها باستخدام مراقبة سلامة الملفات
إرشادات التصحيح:
1. ترقية Nginx UI إلى الإصدار 2.3.4 أو أحدث فوراً عند توفره
2. إذا لم يكن التصحيح متاحاً، تنفيذ الضوابط البديلة
3. اختبار التصحيحات في بيئات غير الإنتاج قبل النشر
الضوابط البديلة:
1. نشر قواعد جدار حماية تطبيقات الويب لحجب تسلسلات اجتياز المسار المشفرة بـ URL
2. تنفيذ التحقق من صحة المدخلات على مستوى التطبيق لرفض محاولات اجتياز المسار
3. تشغيل Nginx UI بامتيازات محدودة (مستخدم غير جذر مع أذونات نظام ملفات مقيدة)
4. استخدام ملفات تعريف AppArmor أو SELinux لتقييد وصول عملية Nginx UI إلى /etc/nginx
5. تنفيذ ضوابط الوصول على مستوى الشبكة لتحديد وصول Nginx UI للمسؤولين المصرح لهم فقط
قواعد الكشف:
1. مراقبة طلبات HTTP إلى Nginx UI التي تحتوي على تسلسلات مشفرة بـ URL
2. التنبيه على أي طلبات DELETE أو تعديل تستهدف مسارات تحتوي على أنماط اجتياز
3. مراقبة دليل /etc/nginx للحذف أو التعديلات غير المتوقعة
4. تتبع محاولات المصادقة الفاشلة متبوعة بالوصول الناجح
5. تسجيل جميع تغييرات الإعدادات مع عنوان IP المصدر وهوية المستخدم