Apache Struts 2 'action:' Parameter Arbitrary Remote Command Execution

critical Nessus Plugin ID 68981

Synopsis

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

Description

The remote web application appears to use Struts 2, a web framework that utilizes OGNL (Object-Graph Navigation Language) as an expression language. Due to a flaw in the evaluation of an OGNL expression prefixed by the 'action:' parameter, a remote, unauthenticated attacker can exploit this issue to execute arbitrary commands on the remote web server. An attacker can exploit the issue by sending a specially crafted HTTP request to the remote web server.

Note that the 'redirect:' and 'redirectAction' parameters are also reportedly affected by the command execution vulnerability.
Additionally, this version of Struts 2 is also reportedly affected by an open redirect vulnerability; however, Nessus has not tested for this additional issue.

Note also that this plugin will only report the first vulnerable instance of a Struts 2 application.

Finally, note that Apache Archiva versions prior to and equal to 1.3.6 are also affected by this issue as the application utilizes a vulnerable version of Struts 2.

Solution

Upgrade to version 2.3.15.1 or later.

See Also

https://www.securityfocus.com/archive/1/527977/30/0/threaded

http://cxsecurity.com/issue/WLB-2014010087

http://struts.apache.org/docs/s2-016.html

Plugin Details

Severity: Critical

ID: 68981

File Name: struts_2_3_15_1_command_execution.nasl

Version: 1.37

Type: remote

Family: CGI abuses

Published: 7/19/2013

Updated: 7/17/2023

Configuration: Enable thorough checks

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: High

Score: 8.1

CVSS v2

Risk Factor: High

Base Score: 9.3

Temporal Score: 7.7

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

CVSS Score Source: CVE-2013-2251

CVSS v3

Risk Factor: Critical

Base Score: 10

Temporal Score: 9.3

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:F/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: 7/16/2013

Vulnerability Publication Date: 7/16/2013

CISA Known Exploited Vulnerability Due Dates: 4/15/2022

Exploitable With

CANVAS (CANVAS)

Core Impact

Metasploit (Apache Struts 2 DefaultActionMapper Prefixes OGNL Code Execution)

Elliot (Apache-Struts DefaultActionMapper < 2.3.15.1 RCE Linux)

Reference Information

CVE: CVE-2013-2251

BID: 61189