Apache Struts 2 REST Plugin XStream XML Request Deserialization RCE

high 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: High

ID: 102977

File Name: struts_2_5_13_rest_rce.nasl

Version: 1.22

Type: remote

Family: CGI abuses

Published: 9/6/2017

Updated: 7/17/2023

Configuration: Enable thorough checks

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: High

Score: 8.9

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Temporal Score: 5.9

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

CVSS Score Source: CVE-2017-9805

CVSS v3

Risk Factor: High

Base Score: 8.1

Temporal Score: 7.7

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:H/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:apache:struts

Exploit Available: true

Exploit Ease: No exploit is required

Exploited by Nessus: true

Patch Publication Date: 9/5/2017

Vulnerability Publication Date: 9/5/2017

CISA Known Exploited Vulnerability Due Dates: 5/3/2022

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