The Twentig plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'featuredImageSizeWidth' parameter in versions up to, and including, 1.9.7 due to insufficient input sanitization and output escaping. 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 Twentig WordPress plugin (versions ≤1.9.7) contains a Stored Cross-Site Scripting (XSS) vulnerability in the 'featuredImageSizeWidth' parameter that allows authenticated contributors and above to inject malicious scripts. While requiring contributor-level access limits immediate risk, the stored nature of the vulnerability means injected scripts persist and execute for all users viewing affected pages. This poses a significant threat to WordPress-based government portals, corporate websites, and content management systems widely deployed across Saudi organizations.
IMMEDIATE ACTIONS:
1. Audit all WordPress installations using Twentig plugin ≤1.9.7 across your organization
2. Review user access logs for suspicious activity by contributors and above
3. Inspect featured image settings and page content for injected scripts (look for <script>, javascript:, onerror=, onload= patterns)
4. Restrict contributor-level permissions to trusted users only; consider demoting unnecessary accounts
5. Enable WordPress security logging and monitoring
PATCHING GUIDANCE:
1. Contact Twentig developers for patch availability timeline
2. If patch released: immediately update to latest version after testing in staging environment
3. If no patch available: consider disabling Twentig plugin temporarily or restricting to administrator-only access
COMPENSATING CONTROLS (if patch unavailable):
1. Implement Web Application Firewall (WAF) rules to detect/block XSS payloads in featured image parameters
2. Use WordPress security plugins (Wordfence, Sucuri) with XSS detection enabled
3. Implement Content Security Policy (CSP) headers to restrict inline script execution
4. Regular security scanning with tools like WPScan or Qualys
5. Database backups before any plugin updates
DETECTION RULES:
1. Monitor wp_postmeta table for suspicious values in featured image size parameters
2. Alert on any script tags or event handlers in post/page content
3. Log all contributor+ user modifications to featured image settings
4. Monitor for unusual JavaScript execution in page rendering
الإجراءات الفورية:
1. تدقيق جميع تثبيتات WordPress التي تستخدم مكون Twentig ≤1.9.7 عبر مؤسستك
2. مراجعة سجلات الوصول للمستخدمين للبحث عن نشاط مريب من قبل المساهمين والمستويات الأعلى
3. فحص إعدادات الصور المميزة ومحتوى الصفحة للبحث عن نصوص برمجية محقونة
4. تقييد أذونات مستوى المساهم للمستخدمين الموثوقين فقط
5. تفعيل تسجيل المراقبة الأمنية في WordPress
إرشادات التصحيح:
1. الاتصال بمطوري Twentig للحصول على جدول زمني لتوفر التصحيح
2. عند إصدار التصحيح: التحديث الفوري إلى أحدث إصدار بعد الاختبار
3. إذا لم يكن هناك تصحيح: فكر في تعطيل المكون مؤقتاً أو تقييده للمسؤولين فقط
الضوابط البديلة:
1. تنفيذ قواعد جدار حماية تطبيقات الويب (WAF) للكشف عن حمولات XSS
2. استخدام مكونات أمان WordPress (Wordfence, Sucuri)
3. تنفيذ رؤوس Content Security Policy (CSP)
4. المسح الأمني المنتظم
5. النسخ الاحتياطية المنتظمة للقاعدة