SonarQube 8.3.1 contains an unquoted service path vulnerability that allows local attackers to gain SYSTEM privileges by exploiting the service executable path. Attackers can replace the wrapper.exe in the service path with a malicious executable to execute code with highest system privileges during service restart.
SonarQube 8.3.1 contains a critical privilege escalation vulnerability through unquoted service paths, allowing local attackers to achieve SYSTEM-level code execution by replacing wrapper.exe with malicious executables. This vulnerability affects organizations using SonarQube for code quality management and requires immediate patching. The attack requires local access but results in complete system compromise with the highest privilege level.
1. IMMEDIATE ACTIONS:
- Identify all SonarQube 8.3.1 installations across your infrastructure
- Restrict local access to SonarQube service directories to authorized personnel only
- Review service account permissions and apply principle of least privilege
- Monitor for suspicious wrapper.exe modifications or replacements
2. PATCHING GUIDANCE:
- Upgrade SonarQube to version 8.4.0 or later immediately
- Apply patches in non-production environments first
- Restart SonarQube services after patching to ensure new service path is properly registered
3. COMPENSATING CONTROLS (if immediate patching not possible):
- Implement file integrity monitoring (FIM) on SonarQube installation directories
- Use Windows AppLocker or equivalent to restrict executable execution in service paths
- Apply NTFS permissions to make wrapper.exe read-only for service account
- Disable local administrator access for non-essential users
4. DETECTION RULES:
- Monitor Windows Event Logs for service path modifications (Event ID 7045)
- Alert on wrapper.exe file modifications or replacements
- Track failed service start attempts with privilege escalation indicators
- Monitor process creation from SonarQube service directories
1. الإجراءات الفورية:
- تحديد جميع تثبيتات SonarQube 8.3.1 عبر البنية التحتية الخاصة بك
- تقييد الوصول المحلي إلى مجلدات خدمة SonarQube للموظفين المصرح لهم فقط
- مراجعة أذونات حساب الخدمة وتطبيق مبدأ أقل امتياز
- مراقبة التعديلات أو الاستبدالات المريبة لـ wrapper.exe
2. إرشادات التصحيح:
- ترقية SonarQube إلى الإصدار 8.4.0 أو أحدث فوراً
- تطبيق التصحيحات في بيئات غير الإنتاج أولاً
- إعادة تشغيل خدمات SonarQube بعد التصحيح لضمان تسجيل مسار الخدمة الجديد بشكل صحيح
3. الضوابط البديلة (إذا لم يكن التصحيح الفوري ممكناً):
- تنفيذ مراقبة سلامة الملفات (FIM) على مجلدات تثبيت SonarQube
- استخدام Windows AppLocker أو ما يعادله لتقييد تنفيذ الملفات التنفيذية في مسارات الخدمة
- تطبيق أذونات NTFS لجعل wrapper.exe للقراءة فقط لحساب الخدمة
- تعطيل وصول المسؤول المحلي للمستخدمين غير الأساسيين
4. قواعد الكشف:
- مراقبة سجلات أحداث Windows لتعديلات مسار الخدمة (معرف الحدث 7045)
- التنبيه على تعديلات أو استبدالات ملف wrapper.exe
- تتبع محاولات بدء الخدمة الفاشلة مع مؤشرات تصعيد الامتيازات
- مراقبة إنشاء العمليات من مجلدات خدمة SonarQube