Webmin before 2.641 contains a stored cross-site scripting vulnerability in the email template description field of the System and Server Status module that allows low-privileged authenticated attackers to execute arbitrary commands by injecting unsanitized input stored in save_tmpl.cgi and rendered unescaped in list_tmpls.cgi.
Webmin versions before 2.641 contain a stored XSS vulnerability in the System and Server Status module's email template description field. Low-privileged authenticated attackers can inject malicious scripts that execute when administrators view template lists, potentially leading to arbitrary command execution. This vulnerability poses a moderate risk to organizations using Webmin for server management, particularly in environments with multiple administrative users.
Immediate Actions:
1. Audit all Webmin installations in your environment and identify versions before 2.641
2. Restrict access to the System and Server Status module to trusted administrators only
3. Review email template configurations for suspicious or unusual descriptions
4. Monitor access logs for list_tmpls.cgi and save_tmpl.cgi for unauthorized modifications
Patching Guidance:
1. Upgrade Webmin to version 2.641 or later when available
2. If immediate patching is not possible, disable the email template functionality in the System and Server Status module
3. Implement input validation and output encoding at the application level if custom modifications are in place
Compensating Controls:
1. Implement Web Application Firewall (WAF) rules to detect and block XSS payloads in template descriptions
2. Use Content Security Policy (CSP) headers to prevent inline script execution
3. Enforce strong authentication and multi-factor authentication for Webmin administrative access
4. Implement role-based access control (RBAC) to limit template modification capabilities
5. Deploy security monitoring to detect suspicious template modifications and rendering
Detection Rules:
1. Monitor for POST requests to save_tmpl.cgi with script tags or event handlers in parameters
2. Alert on GET requests to list_tmpls.cgi followed by unusual JavaScript execution
3. Track modifications to email template descriptions containing HTML/JavaScript entities
4. Monitor for administrative users accessing templates outside normal business hours
الإجراءات الفورية:
1. قم بمراجعة جميع تثبيتات Webmin في بيئتك وحدد الإصدارات السابقة للإصدار 2.641
2. قيّد الوصول إلى وحدة حالة النظام والخادم للمسؤولين الموثوقين فقط
3. راجع تكوينات قالب البريد الإلكتروني بحثاً عن أوصاف مريبة أو غير عادية
4. راقب سجلات الوصول لـ list_tmpls.cgi و save_tmpl.cgi للتعديلات غير المصرح بها
إرشادات التصحيح:
1. قم بترقية Webmin إلى الإصدار 2.641 أو أحدث عند توفره
2. إذا لم يكن التصحيح الفوري ممكناً، قم بتعطيل وظيفة قالب البريد الإلكتروني في وحدة حالة النظام والخادم
3. تطبيق التحقق من الإدخال وترميز الإخراج على مستوى التطبيق إذا كانت التعديلات المخصصة موجودة
الضوابط البديلة:
1. تطبيق قواعد جدار حماية تطبيقات الويب (WAF) للكشف عن حمولات XSS وحجبها في أوصاف القوالب
2. استخدام رؤوس سياسة أمان المحتوى (CSP) لمنع تنفيذ البرامج النصية المضمنة
3. فرض المصادقة القوية والمصادقة متعددة العوامل لوصول Webmin الإداري
4. تطبيق التحكم في الوصول القائم على الأدوار (RBAC) لتحديد قدرات تعديل القوالب
5. نشر المراقبة الأمنية للكشف عن تعديلات القوالب المريبة والعرض
قواعد الكشف:
1. مراقبة طلبات POST إلى save_tmpl.cgi بعلامات البرامج النصية أو معالجات الأحداث في المعاملات
2. تنبيه على طلبات GET إلى list_tmpls.cgi متبوعة بتنفيذ JavaScript غير عادي
3. تتبع التعديلات على أوصاف قالب البريد الإلكتروني التي تحتوي على كيانات HTML/JavaScript
4. مراقبة المستخدمين الإداريين الذين يصلون إلى القوالب خارج ساعات العمل العادية