Statmatic is a Laravel and Git powered content management system (CMS). Prior to versions 5.73.11 and 6.4.0, stored XSS vulnerability in svg and icon related components allow authenticated users with appropriate permissions to inject malicious JavaScript that executes when viewed by higher-privileged users. This has been fixed in 5.73.11 and 6.4.0.
Statamic CMS versions prior to 5.73.11 and 6.4.0 contain a stored XSS vulnerability in SVG and icon components that allows authenticated users to inject malicious JavaScript executable by higher-privileged users. With a CVSS score of 8.7, this vulnerability poses significant risk to organizations using Statamic for content management, particularly those with multi-tier user hierarchies. Immediate patching is critical to prevent privilege escalation and unauthorized actions by attackers with lower-level access.
IMMEDIATE ACTIONS:
1. Identify all Statamic installations in your environment and document current versions
2. Restrict access to SVG and icon upload/management features until patching is complete
3. Review user access logs for suspicious SVG/icon uploads or modifications in the past 90 days
4. Audit all SVG and icon files currently stored in Statamic for malicious content
PATCHING GUIDANCE:
1. Upgrade Statamic to version 5.73.11 or 6.4.0 or later immediately
2. Test patches in non-production environments first
3. Implement staged rollout to production systems
4. Verify SVG rendering functionality post-patch
COMPENSATING CONTROLS (if immediate patching delayed):
1. Implement Content Security Policy (CSP) headers to restrict inline script execution
2. Disable SVG upload functionality at the application level if not critical
3. Implement strict input validation and sanitization for SVG content
4. Enforce principle of least privilege—limit SVG/icon management to trusted administrators only
5. Enable detailed audit logging for all SVG/icon-related activities
DETECTION RULES:
1. Monitor for SVG files containing <script> tags or event handlers (onload, onerror, etc.)
2. Alert on SVG uploads from non-administrative accounts
3. Track modifications to SVG/icon components by lower-privileged users
4. Monitor for unusual JavaScript execution patterns in admin dashboards
5. Log and alert on any XSS-related WAF triggers related to SVG parameters
الإجراءات الفورية:
1. حدد جميع تثبيتات Statamic في بيئتك وقثق الإصدارات الحالية
2. قيد الوصول إلى ميزات تحميل وإدارة SVG والرموز حتى اكتمال التصحيح
3. راجع سجلات الوصول للمستخدمين بحثاً عن عمليات تحميل أو تعديلات SVG مريبة في آخر 90 يوماً
4. تدقيق جميع ملفات SVG والرموز المخزنة حالياً في Statamic بحثاً عن محتوى ضار
إرشادات التصحيح:
1. قم بترقية Statamic إلى الإصدار 5.73.11 أو 6.4.0 أو أحدث على الفور
2. اختبر التصحيحات في بيئات غير الإنتاج أولاً
3. تنفيذ طرح مرحلي لأنظمة الإنتاج
4. تحقق من وظيفة عرض SVG بعد التصحيح
الضوابط البديلة (إذا تأخر التصحيح الفوري):
1. تنفيذ رؤوس سياسة أمان المحتوى (CSP) لتقييد تنفيذ البرامج النصية المضمنة
2. تعطيل وظيفة تحميل SVG على مستوى التطبيق إذا لم تكن حرجة
3. تنفيذ التحقق من الصحة والتطهير الصارم لمحتوى SVG
4. فرض مبدأ أقل امتياز—قيد إدارة SVG والرموز للمسؤولين الموثوقين فقط
5. تفعيل تسجيل التدقيق التفصيلي لجميع الأنشطة المتعلقة بـ SVG والرموز
قواعد الكشف:
1. مراقبة ملفات SVG التي تحتوي على علامات <script> أو معالجات الأحداث (onload, onerror, إلخ)
2. تنبيه عند تحميل SVG من حسابات غير إدارية
3. تتبع التعديلات على مكونات SVG والرموز من قبل المستخدمين ذوي الامتيازات المنخفضة
4. مراقبة أنماط تنفيذ JavaScript غير العادية في لوحات المسؤولين
5. تسجيل والتنبيه على أي محفزات WAF المتعلقة بـ XSS المتعلقة بمعاملات SVG