Vulnerabilities in pkg:maven/org.apache.struts.xwork/xwork-core

PACKAGE
Advisory Identifier: GHSA-4wrr-9h5r-m92w
Advisory Summary

CVE-2012-0391 is a CRITICAL (CVSS 9.8) apache struts remote java code vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Struts2 core libraries in the Maven ecosystem. The issue involves apache struts remote java code execution. Remediation is available by upgrading affected packages to version 2.2.3.1.

16 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.struts.xwork/xwork-core

16 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.struts.xwork/xwork-core. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-4wrr-9h5r-m92w CVE-2012-0391 CRITICAL Apache Struts Remote Java Code Execution
GHSA-qcfc-hmrc-59x7 CVE-2025-68493 HIGH Apache Struts 2 is Missing XML Validation
GHSA-hxqq-w4mr-mc62 CVE-2012-0393 MODERATE Apache Struts's ParameterInterceptor component does not prevent access to public constructors
GHSA-hmvj-gc9q-mg9p CVE-2012-0394 MODERATE Apache Struts's DebuggingInterceptor component allows remote code execution in developer mode
GHSA-wm8w-qp2f-728q CVE-2016-4433 HIGH Apache Struts Open Redirect
GHSA-38qw-j787-v8c2 CVE-2016-4430 HIGH Apache Struts CSRF Vulnerability
GHSA-q2cg-xf9p-h457 CVE-2015-1831 HIGH Incomplete exclude pattern in Apache Struts
GHSA-2ppp-xj34-vvf7 CVE-2012-0392 MODERATE Apache Struts's CookieInterceptor component does not use the parameter-name whitelist
GHSA-hrgc-54mv-58gv CVE-2012-4387 MODERATE Denial of service in Apache Struts
GHSA-9ccm-g362-2r35 CVE-2011-2088 MODERATE XWork in Apache Struts Reveals Sensitive Information
GHSA-gqqm-564f-vvxq CVE-2013-2134 HIGH Arbitrary code execution in Apache Struts 2
GHSA-pw8r-x2qm-3h5m CVE-2013-2135 HIGH Arbitrary code execution in Apache Struts 2
GHSA-mwrx-hx6x-3hhv CVE-2012-0838 HIGH Apache Struts Code injection due to conversion error
GHSA-7ghm-rpc7-p7g5 CVE-2013-2115 HIGH Code injection in Apache Struts
GHSA-vrwc-qjmw-5rjm CVE-2014-0094 MODERATE ClassLoader manipulation in Apache Struts
GHSA-737w-mh58-cxjp CVE-2013-1966 HIGH Arbitrary code execution in Apache Struts

CVE-2012-0391 at a Glance

CVE Identifier CVE-2012-0391
GHSA Identifier GHSA-4wrr-9h5r-m92w
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Struts2 core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2012-0391

To remediate this vulnerability, upgrade all affected Struts2 core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.struts:struts2-core fixed: 2.2.3.1
<dependency>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts2-core</artifactId>
    <version>2.2.3.1</version>
</dependency>
org.apache.struts.xwork:xwork-core fixed: 2.2.3.1
<dependency>
    <groupId>org.apache.struts.xwork</groupId>
    <artifactId>xwork-core</artifactId>
    <version>2.2.3.1</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.struts

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2012-0391, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.struts

Analyze the terminal output to locate any version of Struts2 core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.3.1), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.struts command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Struts2 core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2012-0391 Affected Struts2 core Versions

2 component(s)
Fixed Versions:
2.2.3.1
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.struts:struts2-core
Maven
< 2.2.3.1
2.2.3.1
org.apache.struts.xwork:xwork-core
Maven
< 2.2.3.1
2.2.3.1

References

Frequently Asked Questions

What is CVE-2012-0391?
CVE-2012-0391 is a security vulnerability in Struts2 core involving Apache Struts Remote Java Code Execution under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Struts2 core versions are affected?
Affected versions include releases prior to 2.2.3.1 across affected packages: org.apache.struts:struts2-core, org.apache.struts.xwork:xwork-core.
What version fixes CVE-2012-0391?
Upgrading to 2.2.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is struts2-core affected?
Yes, org.apache.struts:struts2-core is affected in releases prior to 2.2.3.1. Upgrade your dependency to 2.2.3.1 or later.
Is xwork-core affected?
Yes, org.apache.struts.xwork:xwork-core is affected in releases prior to 2.2.3.1. Upgrade your dependency to 2.2.3.1 or later.
What is the CVSS score of CVE-2012-0391?
CVE-2012-0391 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2012-0391?
CVE-2012-0391 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2012-0391?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.struts'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4wrr-9h5r-m92w",
  "modified" : "2026-04-24T21:11:43Z",
  "published" : "2022-05-04T00:29:43Z",
  "aliases" : [ "CVE-2012-0391" ],
  "summary" : "Apache Struts Remote Java Code Execution",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.struts:struts2-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.3.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.struts.xwork:xwork-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-0391"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/25e50069d60434a30395e3a98357ffba2bed427e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/5f54b8d087f5125d96838aafa5f64c2190e6885b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/b4265d369dc29d57a9f2846a85b26598e83f3892"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/struts"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/WW-3668"
  }, {
    "type" : "WEB",
    "url" : "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2012-0391"
  }, {
    "type" : "WEB",
    "url" : "https://www.sec-consult.com/files/20120104-0_Apache_Struts2_Multiple_Critical_Vulnerabilities.txt"
  }, {
    "type" : "WEB",
    "url" : "http://archives.neohapsis.com/archives/bugtraq/2012-01/0031.html"
  }, {
    "type" : "WEB",
    "url" : "http://secunia.com/advisories/47393"
  }, {
    "type" : "WEB",
    "url" : "http://struts.apache.org/2.x/docs/s2-008.html"
  }, {
    "type" : "WEB",
    "url" : "http://struts.apache.org/2.x/docs/version-notes-2311.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.exploit-db.com/exploits/18329"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-29T20:37:05Z",
    "nvd_published_at" : "2012-01-08T15:55:00Z"
  }
}