CVE-2017-9805: Struts2 rest plugin REST Plugin Vulnerability

HIGH
Advisory Identifier: GHSA-gg9m-fj3v-r58c
CVSS 8.1
CWE-502
Published
Advisory Summary

CVE-2017-9805 is a HIGH (CVSS 8.1) rest plugin vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Struts2 rest plugin libraries in the Maven ecosystem. The issue involves rest plugin in apache struts uses an xstreamhandler with an instance of xstream for deserialization without any type filtering. Remediation is available by upgrading affected packages to version 2.3.34, 2.5.13.

CVE-2017-9805 at a Glance

CVE Identifier CVE-2017-9805
GHSA Identifier GHSA-gg9m-fj3v-r58c
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Struts2 rest plugin
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2017-9805

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.

org.apache.struts:struts2-rest-plugin fixed: 2.3.34
<dependency>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts2-rest-plugin</artifactId>
    <version>2.3.34</version>
</dependency>
org.apache.struts:struts2-rest-plugin fixed: 2.5.13
<dependency>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts2-rest-plugin</artifactId>
    <version>2.5.13</version>
</dependency>
Verify Direct and Transitive Dependencies

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-2017-9805, 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.3.34), 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. 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

The REST Plugin in Apache Struts 2.1.1 through 2.3.x before 2.3.34 and 2.5.x before 2.5.13 uses an XStreamHandler with an instance of XStream for deserialization without any type filtering, which can lead to Remote Code Execution when deserializing XML payloads.

CVE-2017-9805 Affected Struts2 rest plugin Versions

2 component(s)
Fixed Versions:
2.3.342.5.13
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.struts:struts2-rest-plugin
Maven
≥ 2.1.1
< 2.3.34
2.3.34
org.apache.struts:struts2-rest-plugin
Maven
≥ 2.5.0
< 2.5.13
2.5.13

References

NVD — CVE-2017-9805 NVD
https://nvd.nist.gov/vuln/detail/CVE-2017-9805
Security Fix Commit FIX COMMIT
https://github.com/apache/struts/commit/19494718865f2fb7da5ea363de3822f87fbda26
Security Fix Commit FIX COMMIT
https://github.com/apache/struts/commit/6dd6e5cfb7b5e020abffe7e8091bd63fe97c10a
blogs.apache.org/foundation/entry/ap... WEB
https://blogs.apache.org/foundation/entry/apache-struts-statement-on-equifax
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=1488482
cwiki.apache.org/confluence/display/... WEB
https://cwiki.apache.org/confluence/display/WW/S2-052
Struts2 rest plugin Source Repository REPOSITORY
https://github.com/apache/struts
lgtm.com/blog/apache_struts_... WEB
https://lgtm.com/blog/apache_struts_CVE-2017-9805
Struts2 rest plugin Security Information SECURITY
https://security.netapp.com/advisory/ntap-20170907-0001
struts.apache.org/docs/s2-052.html WEB
https://struts.apache.org/docs/s2-052.html
Struts2 rest plugin Security Information SECURITY
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20170907-struts2
Struts2 rest plugin Security Information SECURITY
https://web.archive.org/web/20170909031344/http://www.securityfocus.com/bid/100609
Struts2 rest plugin Security Information SECURITY
https://web.archive.org/web/20170922053119/http://www.securitytracker.com/id/1039263
www.cisa.gov/known-exploited-vul... WEB
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9805
www.exploit-db.com/exploits/42627 WEB
https://www.exploit-db.com/exploits/42627
www.kb.cert.org/vuls/id/112992 WEB
https://www.kb.cert.org/vuls/id/112992
Struts2 rest plugin Security Information SECURITY
http://www.oracle.com/technetwork/security-advisory/alert-cve-2017-9805-3889403.html
Struts2 rest plugin Security Information SECURITY
http://www.securityfocus.com/bid/100609
Struts2 rest plugin Security Information SECURITY
http://www.securitytracker.com/id/1039263

Frequently Asked Questions

What is CVE-2017-9805?
CVE-2017-9805 is a security vulnerability in Struts2 rest plugin involving REST Plugin in Apache Struts uses an XStreamHandler with an instance of XStream for deserialization without any type filtering under CWE-502: Deserialization of Untrusted Data.
Which Struts2 rest plugin versions are affected?
Affected versions include releases prior to 2.3.34, 2.5.13 across affected packages: org.apache.struts:struts2-rest-plugin.
What version fixes CVE-2017-9805?
Upgrading to 2.3.34, 2.5.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is struts2-rest-plugin affected?
Yes, org.apache.struts:struts2-rest-plugin is affected in releases prior to 2.3.34, 2.5.13. Upgrade your dependency to 2.3.34, 2.5.13 or later.
What is the CVSS score of CVE-2017-9805?
CVE-2017-9805 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H.
What CWE is associated with CVE-2017-9805?
CVE-2017-9805 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Maven dependencies for CVE-2017-9805?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.struts'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gg9m-fj3v-r58c",
  "modified" : "2025-10-22T17:31:31Z",
  "published" : "2018-10-16T19:37:56Z",
  "aliases" : [ "CVE-2017-9805" ],
  "summary" : "REST Plugin in Apache Struts uses an XStreamHandler with an instance of XStream for deserialization without any type filtering",
  "details" : "The REST Plugin in Apache Struts 2.1.1 through 2.3.x before 2.3.34 and 2.5.x before 2.5.13 uses an XStreamHandler with an instance of XStream for deserialization without any type filtering, which can lead to Remote Code Execution when deserializing XML payloads.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.struts:struts2-rest-plugin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.1"
      }, {
        "fixed" : "2.3.34"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.struts:struts2-rest-plugin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.5.0"
      }, {
        "fixed" : "2.5.13"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-9805"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/19494718865f2fb7da5ea363de3822f87fbda26"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/struts/commit/6dd6e5cfb7b5e020abffe7e8091bd63fe97c10a"
  }, {
    "type" : "WEB",
    "url" : "https://blogs.apache.org/foundation/entry/apache-struts-statement-on-equifax"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1488482"
  }, {
    "type" : "WEB",
    "url" : "https://cwiki.apache.org/confluence/display/WW/S2-052"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/struts"
  }, {
    "type" : "WEB",
    "url" : "https://lgtm.com/blog/apache_struts_CVE-2017-9805"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20170907-0001"
  }, {
    "type" : "WEB",
    "url" : "https://struts.apache.org/docs/s2-052.html"
  }, {
    "type" : "WEB",
    "url" : "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20170907-struts2"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20170909031344/http://www.securityfocus.com/bid/100609"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20170922053119/http://www.securitytracker.com/id/1039263"
  }, {
    "type" : "WEB",
    "url" : "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9805"
  }, {
    "type" : "WEB",
    "url" : "https://www.exploit-db.com/exploits/42627"
  }, {
    "type" : "WEB",
    "url" : "https://www.kb.cert.org/vuls/id/112992"
  }, {
    "type" : "WEB",
    "url" : "http://www.oracle.com/technetwork/security-advisory/alert-cve-2017-9805-3889403.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/100609"
  }, {
    "type" : "WEB",
    "url" : "http://www.securitytracker.com/id/1039263"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:37:16Z",
    "nvd_published_at" : "2017-09-15T19:29:00Z"
  }
}