GitLab has remediated an issue in GitLab EE affecting all versions from 15.4 before 18.8.7, 18.9 before 18.9.3, and 18.10 before 18.10.1 that could have allowed an authenticated user to add email addresses to targeted user accounts due to improper sanitization of HTML content.
GitLab Enterprise Edition contains an HTML sanitization vulnerability (CVE-2026-2995) affecting versions 15.4-18.8.6, 18.9.0-18.9.2, and 18.10.0 that allows authenticated users to add email addresses to other user accounts without authorization. With a CVSS score of 7.7, this vulnerability poses a significant risk to organizations using GitLab EE for source code management and CI/CD pipelines. No patch is currently available, requiring immediate compensating controls and monitoring.
Immediate Actions:
1. Audit all user accounts in GitLab EE instances for unauthorized email address additions, particularly focusing on administrative and privileged accounts
2. Review GitLab access logs for suspicious email modification activities using timestamps from vulnerability discovery date
3. Implement strict access controls limiting email modification permissions to account owners only
4. Enable multi-factor authentication (MFA) for all GitLab users, especially administrators
5. Restrict API access and webhook configurations that could be exploited for account manipulation
Compensating Controls (until patch available):
6. Deploy Web Application Firewall (WAF) rules to detect and block HTML injection attempts in user profile modification requests
7. Implement email verification workflows requiring confirmation before email address changes take effect
8. Monitor and log all account modification activities with real-time alerting for email changes
9. Restrict GitLab instance access to trusted networks using IP whitelisting
10. Disable HTML rendering in user-controlled fields where possible
Detection Rules:
- Alert on any email address modifications to user accounts
- Monitor for multiple failed authentication attempts followed by email changes
- Track API calls to user profile endpoints with email modification parameters
- Flag accounts with multiple email addresses added within short timeframes
الإجراءات الفورية:
1. تدقيق جميع حسابات المستخدمين في نسخ GitLab EE للتحقق من إضافات عناوين بريد إلكترونية غير مصرح بها، مع التركيز على الحسابات الإدارية والمميزة
2. مراجعة سجلات وصول GitLab للأنشطة المريبة لتعديل البريد الإلكتروني باستخدام الطوابع الزمنية من تاريخ اكتشاف الثغرة
3. تنفيذ ضوابط وصول صارمة تقصر صلاحيات تعديل البريد الإلكتروني على مالكي الحسابات فقط
4. تفعيل المصادقة متعددة العوامل (MFA) لجميع مستخدمي GitLab، خاصة المسؤولين
5. تقييد وصول API وتكوينات webhook التي قد تُستغل لمعالجة الحسابات
الضوابط التعويضية (حتى توفر التصحيح):
6. نشر قواعد جدار حماية تطبيقات الويب (WAF) للكشف عن محاولات حقن HTML وحجبها في طلبات تعديل ملف المستخدم
7. تنفيذ سير عمل التحقق من البريد الإلكتروني يتطلب تأكيداً قبل دخول تغييرات عنوان البريد الإلكتروني حيز التنفيذ
8. مراقبة وتسجيل جميع أنشطة تعديل الحسابات مع التنبيهات في الوقت الفعلي لتغييرات البريد الإلكتروني
9. تقييد وصول نسخة GitLab إلى الشبكات الموثوقة باستخدام القائمة البيضاء للعناوين
10. تعطيل عرض HTML في الحقول التي يتحكم فيها المستخدم حيث أمكن
قواعد الكشف:
- تنبيه عند أي تعديلات على عناوين البريد الإلكتروني لحسابات المستخدمين
- مراقبة محاولات المصادقة الفاشلة المتعددة متبوعة بتغييرات البريد الإلكتروني
- تتبع استدعاءات API لنقاط نهاية ملف المستخدم مع معاملات تعديل البريد الإلكتروني
- وضع علامة على الحسابات التي تم إضافة عناوين بريد إلكترونية متعددة لها في فترات زمنية قصيرة