Vulnerabilities in pkg:maven/org.apache.struts/struts2-core
PACKAGECVE-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.
pkg:maven/org.apache.struts/struts2-core
Vulnerability advisories affecting package pkg:maven/org.apache.struts/struts2-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-rg58-xhh7-mqjw | CVE-2025-66675 | HIGH | Apache Struts has a Denial of Service vulnerability |
| GHSA-xx7v-hqxh-cjr9 | CVE-2025-64775 | HIGH | Apache Struts is Vulnerable to DoS via File Leak |
| GHSA-729q-fcgp-r5xh | CVE-2023-41835 | HIGH | Apache Struts Improper Control of Dynamically-Managed Code Resources vulnerability |
| GHSA-47qp-8v9g-39hp | CVE-2013-2251 | CRITICAL | Code injection in Apache Struts |
| GHSA-jc35-q369-45pv | CVE-2020-17530 | CRITICAL | Remote code execution in Apache Struts |
| GHSA-j77q-2qqg-6989 | CVE-2017-5638 | CRITICAL | Apache Struts vulnerable to remote arbitrary command execution due to improper input validation |
| GHSA-cr6j-3jp9-rw65 | CVE-2018-11776 | HIGH | Apache Struts vulnerable to remote command execution (RCE) due to improper input validation |
| GHSA-4g42-gqrg-4633 | CVE-2023-34396 | HIGH | Apache Struts vulnerable to memory exhaustion |
| GHSA-43mq-6xmg-29vm | CVE-2024-53677 | CRITICAL | Apache Struts file upload logic is flawed |
| GHSA-864w-r5qj-h6fj | CVE-2016-4461 | HIGH | Apache Struts forced double OGNL evaluation |
| GHSA-2j39-qcjm-428w | CVE-2023-50164 | CRITICAL | Apache Struts vulnerable to path traversal |
| GHSA-8f6x-v685-g2xc | CVE-2023-34149 | MODERATE | Apache Struts vulnerable to memory exhaustion |
| GHSA-383p-xqxx-rrmp | CVE-2016-3093 | MODERATE | Denial of service in Apache Struts |
| GHSA-hxqq-w4mr-mc62 | CVE-2012-0393 | MODERATE | Apache Struts's ParameterInterceptor component does not prevent access to public constructors |
| GHSA-whmq-v94q-34p9 | CVE-2013-1965 | HIGH | Improper Control of Generation of Code in Apache Struts |
| GHSA-jgcr-9c2q-rvp8 | CVE-2008-6682 | MODERATE | Apache Struts is vulnerable to Cross-site Scripting |
| GHSA-wv7g-xhvw-8hcp | CVE-2008-6505 | MODERATE | Apache Struts directory traversal vulnerability |
| GHSA-x5x7-3v85-wpc4 | CVE-2017-9804 | HIGH | Apache Struts allows entering a custom URL in a form field if built-in URLValidator is used |
| GHSA-9gp7-jvm2-r4mx | CVE-2017-7672 | MODERATE | Apache Struts Improper Input Validation vulnerability |
| GHSA-8fx9-5hx8-crhm | CVE-2017-12611 | CRITICAL | Apache Struts 2.0.1 uses an unintentional expression in a Freemarker tag instead of string literal |
| GHSA-86vq-8qhc-5rqw | CVE-2016-8738 | MODERATE | Apache Struts vulnerable to possible DoS attack when using URLValidator |
| GHSA-xg75-68x3-7p3q | CVE-2016-4465 | MODERATE | Apache Struts vulnerable to possible DoS attack when using URLValidator |
| GHSA-xm92-v2mq-842q | CVE-2016-4436 | CRITICAL | Apache Struts improper action name cleanup |
| GHSA-mmj6-cjj4-hpr5 | CVE-2016-3087 | CRITICAL | Apache Struts vulnerable to arbitrary remote code execution due to improper input validation |
| GHSA-4prj-vw9j-v6pr | CVE-2016-4438 | CRITICAL | Arbitrary code execution in Apache Struts 2 |
| GHSA-pvm9-288c-v5wq | CVE-2016-3082 | CRITICAL | Remote Code Execution in Apache Struts |
| GHSA-876p-4wgc-75rx | CVE-2016-0785 | HIGH | Apache Struts RCE Vulnerability |
| GHSA-q2cg-xf9p-h457 | CVE-2015-1831 | HIGH | Incomplete exclude pattern in Apache Struts |
| GHSA-h4v9-jf2r-9h6m | CVE-2014-7809 | MODERATE | Cross-Site Request Forgery in Apache Struts |
| GHSA-prjv-jj26-wf8h | CVE-2014-0112 | HIGH | ClassLoader manipulation in Apache Struts |
| GHSA-rpj9-r897-wc6q | CVE-2013-2248 | MODERATE | Open redirect in Apache Struts |
| GHSA-2ppp-xj34-vvf7 | CVE-2012-0392 | MODERATE | Apache Struts's CookieInterceptor component does not use the parameter-name whitelist |
| GHSA-2j4q-9fff-236j | CVE-2016-2162 | MODERATE | Apache Struts XSS Vulnerability |
| GHSA-8c6j-ffmf-q6vm | CVE-2016-3081 | HIGH | Apache Struts RCE Vulnerability |
| GHSA-x5fc-pgpx-59j5 | CVE-2010-1870 | MODERATE | Server side object manipulation in Apache Struts |
| GHSA-j68f-8h6p-9h5q | CVE-2011-3923 | CRITICAL | Struts ParameterInterceptor vulnerability allows remote command execution |
| GHSA-j7h6-xr7g-m2c5 | CVE-2013-4316 | HIGH | Code injection in Apache Struts |
| 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-q5q8-jghf-3pm3 | CVE-2013-4310 | MODERATE | Apache Struts2 Broken Access Control Vulnerability |
| GHSA-3g8j-jj54-3vjg | CVE-2013-6348 | MODERATE | Apache Struts is vulnerable to Cross-site Scripting |
| GHSA-mwrx-hx6x-3hhv | CVE-2012-0838 | HIGH | Apache Struts Code injection due to conversion error |
| GHSA-265r-pp83-gww7 | CVE-2015-2992 | MODERATE | Cross-site Scripting in Apache Struts |
| GHSA-7ghm-rpc7-p7g5 | CVE-2013-2115 | HIGH | Code injection in Apache Struts |
| GHSA-56f8-g68r-j699 | CVE-2011-1772 | LOW | Cross-site Scripting in Apache Struts |
| GHSA-vwhv-j36g-5rm8 | CVE-2015-5169 | MODERATE | Cross-site Scripting 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 |
| GHSA-3c5c-xrq4-qhr8 | CVE-2014-0113 | HIGH | ClassLoader manipulation in Apache Struts |
| GHSA-hmhq-382q-mp56 | CVE-2014-0116 | HIGH | ClassLoader manipulation in Apache Struts |
| GHSA-4qgj-9mvg-3929 | CVE-2015-5209 | HIGH | Special top object can be used to access Struts' internals |
| GHSA-m3x6-9v6h-4g28 | CVE-2016-4003 | MODERATE | Cross-site Scripting in Apache Struts |
| GHSA-2rvh-q539-q33v | CVE-2012-4386 | MODERATE | Cross-Site Request Forgery in Apache Struts |
| GHSA-v8j6-6c2r-r27c | CVE-2021-31805 | CRITICAL | Expression Language Injection in Apache Struts |
| GHSA-8m5q-crqq-6pmf | CVE-2012-1592 | HIGH | Unrestricted Upload of File with Dangerous Type in Apache Struts2 |
| GHSA-ccp5-gg58-pxfm | CVE-2019-0233 | HIGH | Improper Preservation of Permissions in Apache Struts |
| GHSA-8mr5-h28g-36qx | CVE-2017-9787 | HIGH | Spring AOP functionality (Struts) vulnerable to DoS attack |
| GHSA-wp4h-pvgw-5727 | CVE-2019-0230 | CRITICAL | Improperly Controlled Modification of Dynamically-Determined Object Attributes in Apache Struts |
CVE-2012-0391 at a Glance
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).
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.
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.2.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.struts.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>2.2.3.1</version>
</dependency>
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
CVE-2012-0391 Affected Struts2 core Versions
2 component(s)| 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?
Which Struts2 core versions are affected?
What version fixes CVE-2012-0391?
Is struts2-core affected?
Is xwork-core affected?
What is the CVSS score of CVE-2012-0391?
What CWE is associated with CVE-2012-0391?
How can I check Maven dependencies for CVE-2012-0391?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}