Apache Struts Remote Code Execution Vulnerability — Forced Object-Graph Navigation Language (OGNL) evaluation in Apache Struts, when evaluated on raw user input in tag attributes, can lead to remote code execution.
CVE-2020-17530 is a critical Remote Code Execution (RCE) vulnerability in Apache Struts caused by forced OGNL expression evaluation on raw user input within tag attributes. An unauthenticated attacker can craft malicious HTTP requests to execute arbitrary code on the server with the privileges of the web application. This vulnerability carries a CVSS score of 9.0 and has confirmed public exploits available, making it an immediate and severe threat. Organizations running Apache Struts-based web applications must patch immediately to prevent full system compromise.
IMMEDIATE ACTIONS:
1. Identify all Apache Struts deployments across your environment using asset inventory and SBOM tools.
2. Isolate or place WAF rules in front of any Struts-based applications immediately.
3. Block or sanitize OGNL expressions in HTTP request parameters at the WAF/reverse proxy layer.
PATCHING GUIDANCE:
4. Upgrade Apache Struts to version 2.5.26 or later, which addresses CVE-2020-17530.
5. Review Apache Struts security advisories at https://struts.apache.org/security/ for the latest guidance.
6. Rebuild and redeploy affected applications after patching the Struts library.
COMPENSATING CONTROLS (if patching is not immediately possible):
7. Deploy a Web Application Firewall (WAF) with rules specifically targeting OGNL injection patterns (e.g., ModSecurity CRS rules for Struts).
8. Restrict outbound network access from application servers to limit post-exploitation lateral movement.
9. Enable application-level logging and monitor for anomalous OGNL expressions in request parameters.
DETECTION RULES:
10. Monitor HTTP requests for OGNL expression patterns such as '%{...}', '${...}', '#context', '#_memberAccess'.
11. Alert on unexpected process spawning from Java application server processes (e.g., tomcat, jboss).
12. Use SIEM correlation rules to detect unusual outbound connections from web application servers.
13. Deploy EDR solutions on application servers and monitor for suspicious child process creation.
الإجراءات الفورية:
1. تحديد جميع نشرات Apache Struts في بيئتك باستخدام أدوات جرد الأصول وSBOM.
2. عزل التطبيقات المبنية على Struts أو وضع قواعد WAF أمامها فوراً.
3. حجب أو تعقيم تعبيرات OGNL في معاملات طلبات HTTP على مستوى WAF أو الوكيل العكسي.
إرشادات التصحيح:
4. الترقية إلى Apache Struts الإصدار 2.5.26 أو أحدث الذي يعالج CVE-2020-17530.
5. مراجعة نشرات أمان Apache Struts على https://struts.apache.org/security/ للحصول على أحدث التوجيهات.
6. إعادة بناء ونشر التطبيقات المتأثرة بعد تصحيح مكتبة Struts.
ضوابط التعويض (إذا تعذّر التصحيح الفوري):
7. نشر جدار حماية تطبيقات الويب (WAF) مع قواعد تستهدف تحديداً أنماط حقن OGNL.
8. تقييد الوصول الشبكي الصادر من خوادم التطبيقات للحد من الحركة الجانبية بعد الاستغلال.
9. تفعيل التسجيل على مستوى التطبيق ومراقبة تعبيرات OGNL الشاذة في معاملات الطلبات.
قواعد الكشف:
10. مراقبة طلبات HTTP بحثاً عن أنماط تعبيرات OGNL مثل '%{...}' و'${...}' و'#context' و'#_memberAccess'.
11. التنبيه على إنشاء عمليات غير متوقعة من عمليات خادم تطبيقات Java.
12. استخدام قواعد ارتباط SIEM للكشف عن الاتصالات الصادرة غير المعتادة من خوادم تطبيقات الويب.
13. نشر حلول EDR على خوادم التطبيقات ومراقبة إنشاء العمليات الفرعية المشبوهة.