GitLab has remediated an issue in GitLab EE affecting all versions from 16.4 before 18.9.7, 18.10 before 18.10.6, and 18.11 before 18.11.3 that could have allowed an authenticated user with developer-role permissions to execute arbitrary JavaScript in other users' browsers due to improper input sanitization.
GitLab Enterprise Edition contains a stored cross-site scripting (XSS) vulnerability affecting versions 16.4-18.9.6, 18.10.0-18.10.5, and 18.11.0-18.11.2. An authenticated developer can inject malicious JavaScript that executes in other users' browsers, potentially leading to session hijacking, credential theft, and unauthorized actions. This vulnerability requires immediate patching once available, as it affects internal development infrastructure widely used across Saudi organizations.
IMMEDIATE ACTIONS:
1. Identify all GitLab EE instances running affected versions (16.4-18.9.6, 18.10.0-18.10.5, 18.11.0-18.11.2)
2. Restrict developer role permissions to read-only access until patching is complete
3. Audit recent commits and merge requests for suspicious JavaScript payloads in comments, descriptions, and wiki pages
4. Review access logs for unusual cross-user activity patterns
PATCHING GUIDANCE:
1. Upgrade to GitLab EE 18.9.7, 18.10.6, or 18.11.3 immediately upon release
2. Test patches in staging environment before production deployment
3. Plan maintenance window with minimal development impact
COMPENSATING CONTROLS (until patch available):
1. Implement Web Application Firewall (WAF) rules to detect and block JavaScript injection patterns in GitLab requests
2. Enable Content Security Policy (CSP) headers with strict script-src directives
3. Disable or restrict developer role creation; audit existing developers
4. Implement session timeout policies (15-30 minutes for GitLab)
5. Enable multi-factor authentication (MFA) for all GitLab users
6. Monitor GitLab logs for XSS payload patterns: <script>, javascript:, onerror=, onload=
DETECTION RULES:
1. Alert on commits containing HTML/JavaScript tags in commit messages or descriptions
2. Monitor for unusual API calls from developer accounts targeting user profile pages
3. Flag merge requests with embedded script tags in comments or code review sections
4. Track failed authentication attempts following GitLab activity spikes
الإجراءات الفورية:
1. تحديد جميع نسخ GitLab EE التي تعمل بالإصدارات المتأثرة (16.4-18.9.6، 18.10.0-18.10.5، 18.11.0-18.11.2)
2. تقييد صلاحيات دور المطور للوصول للقراءة فقط حتى اكتمال التصحيح
3. تدقيق الالتزامات وطلبات الدمج الأخيرة للبحث عن حمولات JavaScript المريبة في التعليقات والأوصاف وصفحات الويكي
4. مراجعة سجلات الوصول للأنشطة غير العادية بين المستخدمين
إرشادات التصحيح:
1. الترقية إلى GitLab EE 18.9.7 أو 18.10.6 أو 18.11.3 فور الإصدار
2. اختبار التصحيحات في بيئة التجريب قبل نشر الإنتاج
3. تخطيط نافذة الصيانة بأقل تأثير على التطوير
الضوابط البديلة (حتى توفر التصحيح):
1. تطبيق قواعد جدار حماية تطبيقات الويب (WAF) للكشف عن أنماط حقن JavaScript وحجبها
2. تفعيل رؤوس سياسة أمان المحتوى (CSP) مع توجيهات script-src صارمة
3. تعطيل أو تقييد إنشاء دور المطور؛ تدقيق المطورين الحاليين
4. تطبيق سياسات انتهاء الجلسة (15-30 دقيقة لـ GitLab)
5. تفعيل المصادقة متعددة العوامل (MFA) لجميع مستخدمي GitLab
6. مراقبة سجلات GitLab للبحث عن أنماط حمولات XSS: <script>، javascript:، onerror=، onload=
قواعد الكشف:
1. التنبيه على الالتزامات التي تحتوي على علامات HTML/JavaScript في رسائل الالتزام أو الأوصاف
2. مراقبة استدعاءات API غير العادية من حسابات المطورين التي تستهدف صفحات ملف المستخدم
3. وضع علامة على طلبات الدمج التي تحتوي على علامات نصية مضمنة في أقسام التعليقات أو مراجعة الكود
4. تتبع محاولات المصادقة الفاشلة التي تتبع ارتفاعات نشاط GitLab