A remote code execution vulnerability (CVE-2017-5638) in the Jakarta Multipart Parser in certain versions of the Apache Struts framework can enable a remote attacker to run arbitrary commands on the web server. Since its initial disclosure, this vulnerability has received significant attention, and is reportedly exploited in the wild. Public exploits are also available for this vulnerability. Customers are advised to immediately patch their servers to the latest versions of Apache Struts or implement recommended workarounds.
A remote code execution vulnerability exists due to a weakness in the way that the Jakarta Multipart Parser component of Apache Struts processes Content-Type headers during a file upload. By exploiting this flaw, a remote attacker could execute arbitrary commands on the remote host subject to the privileges of the user running the web server. Authentication is not required to exploit this flaw.
Tenable has released two plugins to detect this flaw in your network. Plugin 97610 is a remote plugin and will attempt to exploit the flaw against target URLs that are discovered by webmirror. A successful scan of a target will produce the following results:
If you suspect your system is vulnerable, but it is not reporting something similar, check the scan’s Audit Trail for plugin 97610. Nessus may have difficulty crawling some web applications and you may need to adjust policy settings to add a specific URL. This can be done under Assessment > Web Applications > Web Crawler > Start crawling from in the policy:
In addition to our remote check, a local version check is available for Windows targets (plugin 97576). Note that this plugin only runs in scans where the Accuracy setting is set to Show potential false alarms.
What customers should do
Customers who are affected by this vulnerability should upgrade to Apache Struts version 2.3.32 or 22.214.171.124. A workaround is available for Apache Struts version 2.5.8 – 126.96.36.199. This workaround is documented at https://cwiki.apache.org/confluence/display/WW/S2-045.
Due to the nature of this vulnerability, it is critical that vulnerable hosts are patched as quickly as possible. By leveraging the remote check available from Nessus, it is possible to scan all of your web applications to identify any application that is using an outdated version of Struts.
Thanks to William Spires for his contributions to this blog.
Source:: Tenable Blog