Wazuh version 4.12.0 contains an exposure vulnerability in GitHub Actions workflow artifacts that allows attackers to extract the GITHUB_TOKEN from uploaded artifacts. Attackers can use the exposed token within a limited time window to perform unauthorized actions such as pushing malicious commits or altering release tags.
Wazuh 4.12.0 exposes GitHub tokens through workflow artifacts, allowing attackers to extract credentials and perform unauthorized repository actions within a limited window. This vulnerability affects organizations using Wazuh for security monitoring and CI/CD pipelines. While no patch is currently available, immediate mitigation through token rotation and artifact access controls is critical to prevent supply chain compromise.
IMMEDIATE ACTIONS:
1. Rotate all GitHub tokens and personal access tokens (PATs) used in Wazuh CI/CD pipelines immediately
2. Review GitHub Actions workflow logs for unauthorized token usage or suspicious commits in the past 30 days
3. Restrict artifact retention policies to minimum necessary duration (24-48 hours)
4. Disable public artifact access and implement strict access controls
5. Enable GitHub branch protection rules requiring code review for all commits
COMPENSATING CONTROLS:
6. Implement IP whitelisting for GitHub Actions runners
7. Use GitHub's OIDC token provider instead of long-lived PATs where possible
8. Monitor repository for unauthorized commits, tag modifications, or release changes
9. Implement audit logging for all GitHub Actions workflow executions
10. Consider air-gapping Wazuh deployment from CI/CD pipelines until patch is available
DETECTION:
11. Create alerts for artifact downloads from non-standard locations
12. Monitor for GitHub API calls using exposed tokens (check GitHub audit logs)
13. Alert on unexpected commits or tag modifications during workflow execution windows
الإجراءات الفورية:
1. قم بتدوير جميع رموز GitHub والرموز الشخصية (PATs) المستخدمة في خطوط أنابيب Wazuh CI/CD فوراً
2. راجع سجلات GitHub Actions للتحقق من الاستخدام غير المصرح به للرموز أو الالتزامات المريبة في آخر 30 يوماً
3. قيد سياسات الاحتفاظ بـ artifacts بالحد الأدنى الضروري (24-48 ساعة)
4. عطّل الوصول العام إلى artifacts وطبّق ضوابط وصول صارمة
5. فعّل قواعد حماية الفروع في GitHub التي تتطلب مراجعة الكود لجميع الالتزامات
الضوابط التعويضية:
6. طبّق قائمة بيضاء IP لعدّاء GitHub Actions
7. استخدم موفر رموز OIDC من GitHub بدلاً من PATs طويلة الأجل حيث أمكن
8. راقب المستودع للالتزامات غير المصرح بها أو تعديلات الوسوم أو تغييرات الإصدار
9. طبّق تسجيل التدقيق لجميع عمليات تنفيذ سير عمل GitHub Actions
10. فكّر في عزل نشر Wazuh عن خطوط أنابيب CI/CD حتى يتوفر التصحيح
الكشف:
11. أنشئ تنبيهات لتنزيلات artifacts من مواقع غير قياسية
12. راقب استدعاءات GitHub API باستخدام الرموز المكشوفة (تحقق من سجلات تدقيق GitHub)
13. نبّه على الالتزامات أو تعديلات الوسوم غير المتوقعة أثناء نوافذ تنفيذ سير العمل