Primetek Primefaces Remote Code Execution Vulnerability — Primetek Primefaces is vulnerable to a weak encryption flaw resulting in remote code execution
CVE-2017-1000486 is a critical remote code execution vulnerability in PrimeTek PrimeFaces, a widely-used JavaServer Faces (JSF) UI component library. The vulnerability stems from a weak encryption mechanism in the Expression Language (EL) evaluation feature, allowing attackers to craft malicious requests that execute arbitrary code on the server. With a CVSS score of 9.0 and publicly available exploits, this vulnerability poses an immediate threat to any organization running applications built with vulnerable PrimeFaces versions. Active exploitation has been observed in the wild, making immediate patching essential.
Immediate Actions:
1. Identify all applications using PrimeFaces library by scanning for primefaces*.jar files across all servers
2. Upgrade PrimeFaces to version 6.2 or later immediately, which fixes the weak encryption vulnerability
3. If immediate patching is not possible, configure a strong custom encryption key by setting the 'primefaces.SECRET' context parameter in web.xml with a strong, random 16-byte key
4. Block or filter requests containing suspicious 'pfdrid' parameters at the WAF level
Detection Rules:
5. Monitor web server logs for unusual POST requests to javax.faces.resource endpoints with encoded payloads
6. Deploy IDS/IPS signatures for PrimeFaces EL injection patterns (Snort/Suricata rules available)
7. Implement application-level logging to detect EL expression evaluation attempts
Compensating Controls:
8. Restrict network access to affected applications using network segmentation
9. Implement WAF rules to inspect and block serialized Java objects in HTTP requests
10. Enable runtime application self-protection (RASP) if available
الإجراءات الفورية:
1. تحديد جميع التطبيقات التي تستخدم مكتبة PrimeFaces عن طريق البحث عن ملفات primefaces*.jar عبر جميع الخوادم
2. ترقية PrimeFaces إلى الإصدار 6.2 أو أحدث فوراً، والذي يصلح ثغرة التشفير الضعيف
3. إذا لم يكن التصحيح الفوري ممكناً، قم بتكوين مفتاح تشفير مخصص قوي عن طريق تعيين معلمة 'primefaces.SECRET' في ملف web.xml بمفتاح عشوائي قوي بطول 16 بايت
4. حظر أو تصفية الطلبات التي تحتوي على معلمات 'pfdrid' مشبوهة على مستوى جدار حماية تطبيقات الويب
قواعد الكشف:
5. مراقبة سجلات خادم الويب للطلبات POST غير العادية إلى نقاط نهاية javax.faces.resource مع حمولات مشفرة
6. نشر توقيعات IDS/IPS لأنماط حقن EL في PrimeFaces
7. تنفيذ تسجيل على مستوى التطبيق لكشف محاولات تقييم تعبيرات EL
الضوابط التعويضية:
8. تقييد الوصول الشبكي للتطبيقات المتأثرة باستخدام تجزئة الشبكة
9. تنفيذ قواعد WAF لفحص وحظر كائنات Java المتسلسلة في طلبات HTTP
10. تفعيل حماية التطبيقات الذاتية أثناء التشغيل (RASP) إذا كانت متاحة