Apache Struts 2 Dynamic Method Invocation (DMI) Remote Code Execution (CVE-2016-3081, S2-032)
Executive & SecOps Summary
SECOPS ASSESSMENTApache Struts versions 2.3.19 through 2.3.28 with Dynamic Method Invocation (DMI) enabled.
Remote attackers can execute arbitrary code (RCE) with server privileges via specially crafted HTTP requests, leading to full system compromise.
Immediately upgrade to Struts 2.3.20.3, 2.3.24.3, or 2.3.28.1 and set 'struts.enable.DynamicMethodInvocation' to 'false'.
Affected Products & Version Scope
Remediation & Live Workaround Commands
PATCH & WORKAROUND- Upgrade to the latest patched versions:
- Struts 2.3.20.3, 2.3.24.3, or 2.3.28.1 or higher.
- Disable DMI in your
struts.xmlconfiguration:
<constant name="struts.enable.DynamicMethodInvocation" value="false" />- Implement WAF rules to detect and block requests containing the
method:prefix combined with OGNL syntax (e.g.,#,@,Runtime.getRuntime()).
Scan Your Repositories for Transitive Vulnerable Dependencies in 30 Seconds
Automatically detect vulnerable packages across npm, PyPI, Maven, and Go, and open automated fix Pull Requests without breaking your build.
Technical Root Cause & Exploitation Mechanics
The S2-032 vulnerability arises from improper handling of the 'method:' prefix when Dynamic Method Invocation (DMI) is enabled in Apache Struts 2. An attacker can inject malicious OGNL (Object-Graph Navigation Language) expressions through this prefix. Because the framework fails to adequately sanitize these expressions before evaluation, it allows for OGNL expression chaining that can bypass security restrictions and execute arbitrary system commands. This vulnerability is listed in CISA's KEV catalog and has a high EPSS score, indicating active exploitation in the wild.
Official Vendor Advisories & References
Apache Struts 2.3.19 to 2.3.20.2, 2.3.21 to 2.3.24.1, and 2.3.25 to 2.3.28, when Dynamic Method Invocation is enabled, allow remote attackers to execute arbitrary code via method: prefix, related to chained expressions.
Subscribe to Daily Vulnerability Briefings & KEV Alerts
Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.