The Go Night Pro | WordPress Dark Mode Plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's 'go-night-pro-shortcode' shortcode in all versions up to, and including, 1.1.0 due to insufficient input sanitization and output escaping on the user-supplied 'margin' attribute. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.
The Go Night Pro WordPress Dark Mode Plugin contains a Stored Cross-Site Scripting (XSS) vulnerability in versions up to 1.1.0 affecting the 'margin' attribute of the 'go-night-pro-shortcode' shortcode. Authenticated attackers with contributor-level access can inject malicious scripts that execute for all users viewing affected pages. While currently unpatched, the vulnerability requires authenticated access, limiting immediate risk but posing significant threats to WordPress sites with multiple user accounts.
Immediate Actions:
1. Audit all WordPress sites using Go Night Pro plugin for any suspicious shortcode usage with 'margin' attributes
2. Review user access logs for contributor-level accounts that may have injected malicious content
3. Disable the Go Night Pro plugin immediately if not actively used
4. If plugin is required, restrict contributor-level access to trusted users only
Patching Guidance:
1. Monitor the plugin's official repository for security updates
2. Contact the plugin developer for patch timeline
3. Consider switching to alternative dark mode plugins with better security records
Compensating Controls:
1. Implement Web Application Firewall (WAF) rules to detect and block XSS payloads in shortcode attributes
2. Enable WordPress security plugins (Wordfence, Sucuri) with XSS detection capabilities
3. Implement Content Security Policy (CSP) headers to restrict script execution
4. Use WordPress user role management to limit contributor access to essential personnel only
5. Enable WordPress audit logging to track all shortcode modifications
Detection Rules:
1. Monitor for shortcode usage: [go-night-pro-shortcode margin="*<*"] patterns
2. Alert on any modifications to pages/posts containing go-night-pro-shortcode by contributor accounts
3. Scan page content for script tags within margin attribute values
4. Monitor for unusual JavaScript execution on pages with this shortcode
الإجراءات الفورية:
1. تدقيق جميع مواقع WordPress التي تستخدم مكون Go Night Pro للبحث عن أي استخدام مريب للاختصار مع سمات 'margin'
2. مراجعة سجلات وصول المستخدمين لحسابات مستوى المساهم التي قد تكون قد حقنت محتوى ضار
3. تعطيل مكون Go Night Pro فوراً إذا لم يكن قيد الاستخدام النشط
4. إذا كان المكون مطلوباً، قيد وصول مستوى المساهم للمستخدمين الموثوقين فقط
إرشادات التصحيح:
1. راقب مستودع المكون الرسمي للتحديثات الأمنية
2. اتصل بمطور المكون للحصول على جدول زمني للتصحيح
3. فكر في التبديل إلى مكونات الوضع الليلي البديلة ذات السجلات الأمنية الأفضل
الضوابط التعويضية:
1. تنفيذ قواعد جدار حماية تطبيقات الويب (WAF) للكشف عن حمولات XSS وحجبها في سمات الاختصار
2. تفعيل مكونات أمان WordPress (Wordfence, Sucuri) مع قدرات الكشف عن XSS
3. تنفيذ رؤوس Content Security Policy (CSP) لتقييد تنفيذ البرامج النصية
4. استخدام إدارة أدوار مستخدمي WordPress لتحديد وصول المساهم للموظفين الأساسيين فقط
5. تفعيل تسجيل تدقيق WordPress لتتبع جميع تعديلات الاختصار
قواعد الكشف:
1. مراقبة استخدام الاختصار: أنماط [go-night-pro-shortcode margin="*<*"]
2. تنبيه أي تعديلات على الصفحات/المنشورات التي تحتوي على go-night-pro-shortcode بواسطة حسابات المساهم
3. مسح محتوى الصفحة للبحث عن علامات البرامج النصية ضمن قيم سمة الهامش
4. مراقبة تنفيذ JavaScript غير العادي على الصفحات التي تحتوي على هذا الاختصار