Apache Struts 2 REST Plugin XStream XML Request Deserialization RCE

Medium Nessus Plugin ID 102977

Synopsis

The remote web server contains a web application that uses a Java framework that is affected by a remote code execution vulnerability.

Description

The remote web application appears to use the Apache Struts 2 web framework. A remote code execution vulnerability exists in the REST plugin, which uses XStreamHandler to insecurely deserialize user-supplied input in XML requests. An unauthenticated, remote attacker can exploit this, via a specially crafted XML request, to execute arbitrary code.

Note that this plugin only reports the first vulnerable instance of a Struts 2 application.

Solution

Upgrade to Apache Struts version 2.3.34 or 2.5.13 or later.

See Also

https://cwiki.apache.org/confluence/display/WW/S2-052

https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.3.34

https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.5.13

https://lgtm.com/blog/apache_struts_CVE-2017-9805_announcement

https://lgtm.com/blog/apache_struts_CVE-2017-9805

https://github.com/jas502n/St2-052

Plugin Details

Severity: Medium

ID: 102977

File Name: struts_2_5_13_rest_rce.nasl

Version: 1.16

Type: remote

Family: CGI abuses

Published: 2017/09/06

Updated: 2020/06/12

Dependencies: 11936, 10107, 67257

Risk Information

Risk Factor: Medium

CVSS Score Source: CVE-2017-9805

CVSS v2.0

Base Score: 6.8

Temporal Score: 5.6

Vector: CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P

Temporal Vector: CVSS2#E:F/RL:OF/RC:C

CVSS v3.0

Base Score: 8.1

Temporal Score: 7.5

Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:F/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:apache:struts

Excluded KB Items: Settings/disable_cgi_scanning

Exploit Available: true

Exploit Ease: No exploit is required

Exploited by Nessus: true

Patch Publication Date: 2017/09/05

Vulnerability Publication Date: 2017/09/05

Exploitable With

Core Impact

Metasploit (Apache Struts 2 REST Plugin XStream RCE)

Elliot (Apache Struts REST Plugin XStream RCE)

Reference Information

CVE: CVE-2017-9805