CVE-2018-1327: Struts2 rest plugin Denial of Service Vulnerability
HIGHCVE-2018-1327 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-91: XML Injection (aka Blind XPath Injection)) affecting Struts2 rest plugin libraries in the Maven ecosystem. The issue involves apache struts rest plugin can potentially allow a dos attack. Remediation is available by upgrading affected packages to version 2.5.16.
CVE-2018-1327 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2018-1327
To remediate this vulnerability, upgrade all affected Struts2 rest plugin 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-rest-plugin</artifactId>
<version>2.5.16</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-2018-1327, 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 rest plugin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.5.16), 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-91: XML Injection (aka Blind XPath Injection), where the product does not properly neutralize special elements that are used in xml, allowing attackers to modify the syntax, content, or commands of the xml before it is processed by an end system. In Struts2 rest plugin, 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-2018-1327 Affected Struts2 rest plugin Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.struts:struts2-rest-plugin
|
Maven |
≥ 2.1.1
< 2.5.16
|
2.5.16
|
References
Frequently Asked Questions
What is CVE-2018-1327?
Which Struts2 rest plugin versions are affected?
What version fixes CVE-2018-1327?
Is struts2-rest-plugin affected?
What is the CVSS score of CVE-2018-1327?
What CWE is associated with CVE-2018-1327?
How can I check Maven dependencies for CVE-2018-1327?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-38cr-2ph5-frr9",
"modified" : "2024-01-05T16:06:12Z",
"published" : "2018-10-16T19:35:26Z",
"aliases" : [ "CVE-2018-1327" ],
"summary" : "Apache Struts REST Plugin can potentially allow a DoS attack",
"details" : "The Apache Struts REST Plugin is using XStream library which is vulnerable and allow perform a DoS attack when using a malicious request with specially crafted XML payload. Upgrade to the Apache Struts version 2.5.16 and switch to an optional Jackson XML handler as described here http://struts.apache.org/plugins/rest/#custom-contenttypehandlers. Another option is to implement a custom XML handler based on the Jackson XML handler from the Apache Struts 2.5.16.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.struts:struts2-rest-plugin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.1"
}, {
"fixed" : "2.5.16"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1327"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/struts/commit/4260bee634cb606be6071bce2383fddb510608aa"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/struts/commit/67ecf3a21608e20449bcb7895b22204b400fecd4"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/struts/commit/9260720568cee9e868d2899228eceed0c3359323"
}, {
"type" : "WEB",
"url" : "https://cwiki.apache.org/confluence/display/WW/S2-056"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/struts"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r02c2d634fa74209d941c90f9a4cd36a6f12366ca65f9b90446ff2de3@%3Cissues.struts.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rf482c101a88445d73cc2e89dbf7f16ae00a4aa79a544a1e72b2326db@%3Cissues.struts.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20180330-0001"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200227124859/http://www.securityfocus.com/bid/103516"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200923124543/http://www.securitytracker.com/id/1040575"
}, {
"type" : "WEB",
"url" : "http://www.oracle.com/technetwork/security-advisory/cpujul2018-4258247.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-91" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T20:54:29Z",
"nvd_published_at" : null
}
}