Executive Summary

Summary
Title Apache Struts 2 framework REST plugin insecurely deserializes untrusted XML data
Informations
Name VU#112992 First vendor Publication 2017-09-06
Vendor VU-CERT Last vendor Modification 2017-09-06
Severity (Vendor) N/A Revision M

Security-Database Scoring CVSS v3

Cvss vector : N/A
Overall CVSS Score NA
Base Score NA Environmental Score NA
impact SubScore NA Temporal Score NA
Exploitabality Sub Score NA
 
Calculate full CVSS 3.0 Vectors scores

Security-Database Scoring CVSS v2

Cvss vector : (AV:N/AC:M/Au:N/C:P/I:P/A:P)
Cvss Base Score 6.8 Attack Range Network
Cvss Impact Score 6.4 Attack Complexity Medium
Cvss Expoit Score 8.6 Authentication None Required
Calculate full CVSS 2.0 Vectors scores

Detail

Vulnerability Note VU#112992

Apache Struts 2 framework REST plugin insecurely deserializes untrusted XML data

Original Release date: 06 Sep 2017 | Last revised: 06 Sep 2017

Overview

Apache Struts 2 framework, versions 2.5 to 2.5.12, with REST plugin insecurely deserializes untrusted XML data. A remote, unauthenticated attacker can leverage this vulnerability to execute arbitrary code in the context of the Struts application.

Description

CWE-502: Deserialization of Untrusted Data - CVE-2017-9805

In Apache Struts 2 framework, versions 2.5 to 2.5.12, the REST plugin uses XStreamHandler with an instance of XStream to deserialize XML data. Because there is no type filtering, a remote, unauthenticated attacker may send a specially crafted XML payload to execute arbitrary code in the context of the Struts application.

Refer to the researcher's blog post for more information about this vulnerability. A Metasploit module with exploit code is publicly available.

Impact

A remote, unauthenticated attacker may send a specially crafted XML payload to execute arbitrary code on vulnerable servers in the context of the Struts application.

Solution

Apply an update

The vendor has released version 2.5.13 to address this vulnerability. No workaround is possible according to the vendor, so patching is strongly recommended.

Remove or limit the REST plugin

If it is not used, consider removing the REST plugin. Per the vendor, it is also possible to limit its functionality to normal server pages or JSON with the following configuration change in struts.xml:

    <constant name="struts.action.extension" value="xhtml,,json" />

Vendor Information (Learn More)

VendorStatusDate NotifiedDate Updated
Apache StrutsAffected-06 Sep 2017
If you are a vendor and your product is affected, let us know.

CVSS Metrics (Learn More)

GroupScoreVector
Base10.0AV:N/AC:L/Au:N/C:C/I:C/A:C
Temporal8.3E:F/RL:OF/RC:C
Environmental8.3CDP:ND/TD:H/CR:ND/IR:ND/AR:ND

References

  • https://cwe.mitre.org/data/definitions/502.html
  • https://struts.apache.org/docs/s2-052.html
  • https://lgtm.com/blog/apache_struts_CVE-2017-9805
  • https://github.com/rapid7/metasploit-framework/pull/8924/files

Credit

Man Yue Mo of lgtm is credited with reporting this vulnerability to the vendor.

This document was written by Joel Land.

Other Information

  • CVE IDs:CVE-2017-9805
  • Date Public:05 Sep 2017
  • Date First Published:06 Sep 2017
  • Date Last Updated:06 Sep 2017
  • Document Revision:13

Feedback

If you have feedback, comments, or additional information about this vulnerability, please send us email.

Original Source

Url : http://www.kb.cert.org/vuls/id/112992

CWE : Common Weakness Enumeration

% Id Name
100 % CWE-502 Deserialization of Untrusted Data

CPE : Common Platform Enumeration

TypeDescriptionCount
Application 58

SAINT Exploits

Description Link
Apache Struts REST plugin XStream deserialization vulnerability More info here

Snort® IPS/IDS

Date Description
2017-10-10 Java XML deserialization remote code execution attempt
RuleID : 44315 - Revision : 3 - Type : SERVER-WEBAPP

Nessus® Vulnerability Scanner

Date Description
2017-09-28 Name : A web application running on the remote host is affected by a denial of servi...
File : mysql_enterprise_monitor_3_4_3_4225.nasl - Type : ACT_GATHER_INFO
2017-09-06 Name : The remote web server contains a web application that uses a Java framework t...
File : struts_2_5_13_rest_rce.nasl - Type : ACT_ATTACK
2017-09-05 Name : A web application running on the remote host uses a Java framework that is af...
File : struts_2_5_13.nasl - Type : ACT_GATHER_INFO

Alert History

If you want to see full details history, please login or register.
0
1
Date Informations
2017-10-31 09:23:50
  • Multiple Updates
2017-09-06 17:22:32
  • First insertion