Apache Struts 2.3.5 - 2.3.31 / 2.5.x < 2.5.10.1 Jakarta Multipart Parser RCE (S2-045) (S2-046)

critical Nessus Plugin ID 97576

Synopsis

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

Description

The version of Apache Struts running on the remote host is 2.3.5 through 2.3.31 or else 2.5.x prior to 2.5.10.1. It is, therefore, affected by a remote code execution vulnerability in the Jakarta Multipart parser due to improper handling of the Content-Type, Content-Disposition, and Content-Length headers. An unauthenticated, remote attacker can exploit this, via a specially crafted header value in the HTTP request, to potentially execute arbitrary code.

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Apache Struts version 2.3.32 / 2.5.10.1 or later.
Alternatively, apply the workaround referenced in the vendor advisory.

See Also

http://blog.talosintelligence.com/2017/03/apache-0-day-exploited.html

http://www.nessus.org/u?77e9c654

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

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

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

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

Plugin Details

Severity: Critical

ID: 97576

File Name: struts_2_5_10_1_win_local.nasl

Version: 1.25

Type: combined

Agent: windows, macosx, unix

Family: Misc.

Published: 3/7/2017

Updated: 4/11/2022

Configuration: Enable thorough checks

Supported Sensors: Frictionless Assessment Agent, Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Critical

Score: 9.2

CVSS v2

Risk Factor: Critical

Base Score: 10

Temporal Score: 8.7

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

CVSS Score Source: CVE-2017-5638

CVSS v3

Risk Factor: Critical

Base Score: 10

Temporal Score: 9.5

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/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: Exploits are available

Patch Publication Date: 3/6/2017

Vulnerability Publication Date: 3/6/2017

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

Exploitable With

CANVAS (CANVAS)

Core Impact

Metasploit (Apache Struts Jakarta Multipart Parser OGNL Injection)

Reference Information

CVE: CVE-2017-5638

BID: 96729

CERT: 834067