CVE-2008-6682: Struts2 core Cross-Site Scripting Vulnerability
MODERATECVE-2008-6682 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Struts2 core libraries in the Maven ecosystem. The issue involves apache struts is vulnerable to cross-site scripting. Remediation is available by upgrading affected packages to version 2.0.11.1, 2.1.1.
CVE-2008-6682 at a Glance
How to Fix CVE-2008-6682
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.0.11.1</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.1.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-2008-6682, 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.0.11.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-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 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-2008-6682 Affected Struts2 core Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.struts:struts2-core
|
Maven |
≥ 2.0.0
< 2.0.11.1
|
2.0.11.1
|
|
org.apache.struts:struts2-core
|
Maven |
≥ 2.1.0
< 2.1.1
|
2.1.1
|
References
Frequently Asked Questions
What is CVE-2008-6682?
Which Struts2 core versions are affected?
What version fixes CVE-2008-6682?
Is struts2-core affected?
What CWE is associated with CVE-2008-6682?
How can I check Maven dependencies for CVE-2008-6682?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jgcr-9c2q-rvp8",
"modified" : "2024-02-09T19:15:36Z",
"published" : "2022-05-17T05:52:45Z",
"aliases" : [ "CVE-2008-6682" ],
"summary" : "Apache Struts is vulnerable to Cross-site Scripting",
"details" : "Multiple cross-site scripting (XSS) vulnerabilities in Apache Struts 2.0.x before 2.0.11.1 and 2.1.x before 2.1.1 allow remote attackers to inject arbitrary web script or HTML via vectors associated with improper handling of (1) \" (double quote) characters in the href attribute of an s:a tag and (2) parameters in the action attribute of an s:url tag.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.struts:struts2-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.11.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.struts:struts2-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.0"
}, {
"fixed" : "2.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2008-6682"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/struts/commit/09147ffad2b3046ed21af0f524c5088e2ac551e6"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/struts/commit/bd3f2f59c9b09f70aed3ebab6bb69b464ee2d6cb"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/struts/commit/dae026a0f0511f83852053bae9d5a622e7f80486"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/struts"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/struts/browse/WW-2414"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/struts/browse/WW-2427"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20080610075918/http://www.nabble.com/Feedback%3A-WW-2414%2C-XSS-attack-is-possible-if-using-%3Cs%3Aurl-...%3E-and-%3Cs%3Aa-...%3E-td14771449i20.html"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20080611112834/http://www.nabble.com/Feedback%3A-WW-2414%2C-XSS-attack-is-possible-if-using-%3Cs%3Aurl-...%3E-and-%3Cs%3Aa-...%3E-td14771449.html"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200229155553/http://www.securityfocus.com/bid/34686"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-09T19:15:36Z",
"nvd_published_at" : "2009-04-09T15:08:00Z"
}
}