CVE-2012-0391: Apache Struts Remote Java Code Execution

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.

Technologies: Apache Struts 2, org.apache.struts:struts2-core (Maven), org.apache.struts.xwork:xwork-core (Maven). Vendors: Apache, Maven.

Quick answers

Is CVE-2012-0391 exploited in the wild?
Yes. CVE-2012-0391 is known to be exploited in the wild, first recorded on 21 January 2022. Treat it as urgent.
How severe is CVE-2012-0391?
Critical severity, with a CVSS score of 9.8, published 4 May 2022.
Which products and versions are affected?
org.apache.struts:struts2-core (Maven) < 2.2.3.1, ECOSYSTEM:introduced=0,fixed=2.2.3.1; org.apache.struts.xwork:xwork-core (Maven) < 2.2.3.1, ECOSYSTEM:introduced=0,fixed=2.2.3.1.
Is there a fix for CVE-2012-0391?
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

Affected products

  • Apache Struts 2
  • org.apache.struts:struts2-core (Maven) < 2.2.3.1, ECOSYSTEM:introduced=0,fixed=2.2.3.1
  • org.apache.struts.xwork:xwork-core (Maven) < 2.2.3.1, ECOSYSTEM:introduced=0,fixed=2.2.3.1

Identifiers

  • CVE-2012-0391
  • GHSA-4wrr-9h5r-m92w

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.