CVE-2012-1006: Struts2 parent Cross-Site Scripting Vulnerability
MODERATECVE-2012-1006 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Struts2 parent libraries in the Maven ecosystem. The issue involves apache struts multiple cross-site scripting vulnerabilities. Remediation is available by upgrading affected packages to version 2.1.2, 2.2.3.1.
CVE-2012-1006 at a Glance
How to Fix CVE-2012-1006
To remediate this vulnerability, upgrade all affected Struts2 parent 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-parent</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</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-1006, 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 parent in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.2), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Struts2 parent, 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-1006 Affected Struts2 parent Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.struts:struts2-parent
|
Maven |
< 2.1.2
|
2.1.2
|
|
org.apache.struts:struts2-parent
|
Maven |
≥ 2.2
< 2.2.3.1
|
2.2.3.1
|
References
Frequently Asked Questions
What is CVE-2012-1006?
Which Struts2 parent versions are affected?
What version fixes CVE-2012-1006?
Is struts2-parent affected?
What CWE is associated with CVE-2012-1006?
How can I check Maven dependencies for CVE-2012-1006?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cmpm-jg8r-fv37",
"modified" : "2023-08-29T20:07:59Z",
"published" : "2022-05-17T01:49:11Z",
"aliases" : [ "CVE-2012-1006" ],
"summary" : "Apache Struts Multiple Cross-site Scripting Vulnerabilities",
"details" : "Multiple cross-site scripting (XSS) vulnerabilities in Apache Struts 2.0.14 and 2.2.3 allow remote attackers to inject arbitrary web script or HTML via the (1) name or (2) lastName parameter to `struts2-showcase/person/editPerson.action`, or the (3) clientName parameter to `struts2-rest-showcase/orders`.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.struts:struts2-parent"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.0.14"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.struts:struts2-parent"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2"
}, {
"fixed" : "2.2.3.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.2.3"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-1006"
}, {
"type" : "WEB",
"url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/72888"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20120219225953/http://secpod.org/advisories/SecPod_Apache_Struts_Multiple_Parsistant_XSS_Vulns.txt"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20131013214245/http://secpod.org/blog/?p=450"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200229131840/http://www.securityfocus.com/bid/51902"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-29T20:07:59Z",
"nvd_published_at" : "2012-02-07T04:09:00Z"
}
}