Apache Struts 1 Improper Input Validation Vulnerability — The Struts 1 plugin in Apache Struts might allow remote code execution via a malicious field value passed in a raw message to the ActionMessage.
CVE-2017-9791 is a critical remote code execution vulnerability in the Apache Struts 1 plugin for Apache Struts 2, caused by improper input validation when processing ActionMessage with raw user-supplied data. With a CVSS score of 9.0 and publicly available exploits, this vulnerability allows unauthenticated attackers to execute arbitrary code on affected servers. Given that Apache Struts is widely deployed in enterprise web applications, this poses an immediate and severe threat to organizations that have not patched or migrated away from Struts 1 plugin usage.
Immediate Actions:
1. Identify all applications using Apache Struts with the Struts 1 plugin by scanning web application servers for struts2-struts1-plugin JAR files.
2. If the Struts 1 plugin is not required, remove it immediately from all deployments.
3. Apply the latest Apache Struts patches — upgrade to Struts 2.5.12 or later which addresses this vulnerability.
Compensating Controls:
4. Implement Web Application Firewall (WAF) rules to detect and block malicious payloads targeting Struts ActionMessage parameters.
5. Restrict network access to Struts-based applications using network segmentation and firewall rules.
6. Enable input validation and sanitization at the application level for all user-supplied data.
Detection Rules:
7. Monitor for unusual process execution on web application servers (e.g., cmd.exe, /bin/sh spawned by Java processes).
8. Deploy IDS/IPS signatures for known Struts exploitation patterns.
9. Review web server logs for anomalous POST requests with OGNL expressions or suspicious ActionMessage parameters.
10. Consider migrating legacy Struts 1 applications to modern frameworks as a long-term strategy.
الإجراءات الفورية:
1. تحديد جميع التطبيقات التي تستخدم Apache Struts مع إضافة Struts 1 عن طريق فحص خوادم تطبيقات الويب بحثاً عن ملفات struts2-struts1-plugin JAR.
2. إذا لم تكن إضافة Struts 1 مطلوبة، قم بإزالتها فوراً من جميع عمليات النشر.
3. تطبيق أحدث تصحيحات Apache Struts — الترقية إلى Struts 2.5.12 أو أحدث.
الضوابط التعويضية:
4. تنفيذ قواعد جدار حماية تطبيقات الويب (WAF) لاكتشاف وحظر الحمولات الضارة التي تستهدف معلمات Struts ActionMessage.
5. تقييد الوصول الشبكي إلى التطبيقات المبنية على Struts باستخدام تجزئة الشبكة وقواعد جدار الحماية.
6. تفعيل التحقق من المدخلات وتنقيتها على مستوى التطبيق لجميع البيانات المقدمة من المستخدم.
قواعد الكشف:
7. مراقبة تنفيذ العمليات غير المعتادة على خوادم تطبيقات الويب.
8. نشر توقيعات IDS/IPS لأنماط استغلال Struts المعروفة.
9. مراجعة سجلات خادم الويب بحثاً عن طلبات POST غير طبيعية تحتوي على تعبيرات OGNL.
10. النظر في ترحيل تطبيقات Struts 1 القديمة إلى أطر عمل حديثة كاستراتيجية طويلة المدى.