Jenkins Stapler Web Framework Deserialization of Untrusted Data Vulnerability — A code execution vulnerability exists in the Stapler web framework used by Jenkins
CVE-2018-1000861 is a critical deserialization vulnerability in the Stapler web framework used by Jenkins, allowing remote code execution. With a CVSS score of 9.0 and publicly available exploits, this vulnerability enables unauthenticated attackers to execute arbitrary code on Jenkins servers. This vulnerability has been actively exploited in the wild and is particularly dangerous as Jenkins is widely used in CI/CD pipelines across enterprises. Immediate patching is essential as exploitation can lead to complete system compromise and lateral movement within networks.
Immediate Actions:
1. Identify all Jenkins instances in your environment, including development, staging, and production
2. Upgrade Jenkins to version 2.154 or later (LTS: 2.138.4 or later) which contains the fix
3. If immediate patching is not possible, restrict network access to Jenkins servers using firewall rules — limit access to trusted IPs only
4. Disable public-facing Jenkins instances immediately
Compensating Controls:
1. Place Jenkins behind a reverse proxy with authentication
2. Enable Jenkins security realm and authorization strategy
3. Implement network segmentation to isolate CI/CD infrastructure
4. Monitor Jenkins logs for unusual HTTP requests to Stapler endpoints
Detection Rules:
1. Monitor for unusual POST requests to Jenkins URLs containing serialized Java objects
2. Alert on unexpected process execution from Jenkins service accounts
3. Deploy IDS/IPS signatures for Java deserialization attacks
4. Monitor for outbound connections from Jenkins servers to unusual destinations
5. Check for indicators of compromise: unexpected cron jobs, new user accounts, or modified Jenkins configurations
الإجراءات الفورية:
1. تحديد جميع مثيلات Jenkins في بيئتك، بما في ذلك بيئات التطوير والاختبار والإنتاج
2. ترقية Jenkins إلى الإصدار 2.154 أو أحدث (LTS: 2.138.4 أو أحدث) الذي يحتوي على الإصلاح
3. إذا لم يكن التصحيح الفوري ممكناً، قم بتقييد الوصول الشبكي لخوادم Jenkins باستخدام قواعد جدار الحماية — اقصر الوصول على عناوين IP الموثوقة فقط
4. تعطيل مثيلات Jenkins المواجهة للإنترنت فوراً
الضوابط التعويضية:
1. وضع Jenkins خلف وكيل عكسي مع المصادقة
2. تفعيل نطاق أمان Jenkins واستراتيجية التفويض
3. تنفيذ تجزئة الشبكة لعزل بنية CI/CD التحتية
4. مراقبة سجلات Jenkins للطلبات HTTP غير العادية لنقاط نهاية Stapler
قواعد الكشف:
1. مراقبة طلبات POST غير العادية لعناوين URL الخاصة بـ Jenkins التي تحتوي على كائنات Java مسلسلة
2. التنبيه عند تنفيذ عمليات غير متوقعة من حسابات خدمة Jenkins
3. نشر توقيعات IDS/IPS لهجمات إلغاء تسلسل Java
4. مراقبة الاتصالات الصادرة من خوادم Jenkins إلى وجهات غير عادية
5. التحقق من مؤشرات الاختراق: مهام cron غير متوقعة، حسابات مستخدمين جديدة، أو تعديلات على تكوينات Jenkins