CVE-2012-0394: Xwork core Remote Code Execution Vulnerability
MODERATECVE-2012-0394 is a MODERATE remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Xwork core libraries in the Maven ecosystem. The issue involves apache struts's debugginginterceptor component allows remote code execution in developer mode. Remediation is available by upgrading affected packages to version 2.3.18.
CVE-2012-0394 at a Glance
How to Fix CVE-2012-0394
To remediate this vulnerability, upgrade all affected Xwork 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.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>2.3.18</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.xwork
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2012-0394, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.struts.xwork
Analyze the terminal output to locate any version of Xwork core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.18), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.struts.xwork 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 Xwork 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-0394 Affected Xwork core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.struts.xwork:xwork-core
|
Maven |
< 2.3.18
|
2.3.18
|
References
Frequently Asked Questions
What is CVE-2012-0394?
Which Xwork core versions are affected?
What version fixes CVE-2012-0394?
Is xwork-core affected?
What CWE is associated with CVE-2012-0394?
How can I check Maven dependencies for CVE-2012-0394?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hmvj-gc9q-mg9p",
"modified" : "2024-03-05T19:29:51Z",
"published" : "2022-05-04T00:29:43Z",
"aliases" : [ "CVE-2012-0394" ],
"summary" : "Apache Struts's DebuggingInterceptor component allows remote code execution in developer mode",
"details" : "The DebuggingInterceptor component in Apache Struts before 2.3.1.1, when developer mode is used, allows remote attackers to execute arbitrary commands via unspecified vectors. NOTE: the vendor characterizes this behavior as not \"a security vulnerability itself.\"",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.struts.xwork:xwork-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.18"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-0394"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/struts/commit/34c80dae734e70f13c0e46f9c83602fb71318e58"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/struts/commit/9cad25f258bb2629d263f828574d2671366c238d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/struts"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/WW-3729"
}, {
"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://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"
}, {
"type" : "WEB",
"url" : "http://www.exploit-db.com/exploits/31434"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-12-27T20:24:30Z",
"nvd_published_at" : "2012-01-08T15:55:00Z"
}
}