CVE-2012-0391 · Severity: critical · CVSS 9.8 · Exploited in the wild · Published 2022-05-04
The `ExceptionDelegator` component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during certain exception handling for mismatched data types of properties, which allows remote attackers to execute arbitrary Java code via a crafted parameter.
Yes. org.apache.struts:struts2-core (Maven): upgrade to 2.2.3.1 or later; org.apache.struts.xwork:xwork-core (Maven): upgrade to 2.2.3.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2012-0391?
Check whether you run Apache Struts 2, org.apache.struts:struts2-core (Maven) or org.apache.struts.xwork:xwork-core (Maven) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
org.apache.struts:struts2-core (Maven): upgrade to 2.2.3.1 or later
# set org.apache.struts:struts2-core to 2.2.3.1 in your pom.xml or build.gradle
org.apache.struts.xwork:xwork-core (Maven): upgrade to 2.2.3.1 or later
# set org.apache.struts.xwork:xwork-core to 2.2.3.1 in your pom.xml or build.gradle