ZeroHour
Security Affairspublished ()ingested @securityaffairs1

CVE-2017-12617 Code Execution flaw patched in Apache Tomcat

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2017-12615
+1 in the same advisory: …12616
Unauthenticated RCE in Apache Tomcat 7 on Windows via HTTP PUT (CVE-2017-12615)

Apache Tomcat 7.0.0 through 7.0.79 running on Windows with HTTP PUT enabled on the Default servlet (the readonly initialisation parameter set to false, which is not the default configuration) allows an unauthenticated attacker to upload a JSP file via a specially crafted PUT request (CWE-434), bypassing the extension check (e.g. via trailing-slash or case variations). The uploaded JSP can then be requested, and any code it contains is executed in the Tomcat server context, giving the attacker unauthenticated remote code execution. Only Tomcat 7 deployments on Windows with PUTs enabled are directly affected; because bundled Tomcat is also shipped in products from Red Hat (JBoss Enterprise Web Server, RHEL variants) and NetApp, those vendors issued advisories as well. This flaw is closely related to CVE-2017-12617, which was reported and patched around the same time. Exploitation is confirmed in the wild: it was added to CISA KEV on 2022-03-25 with known ransomware use, has two public proof-of-concept references, and EPSS assigns a 99.6% probability of exploitation within 30 days.

Do: Upgrade Tomcat beyond the affected 7.0.0–7.0.79 range per vendor instructions (Apache Tomcat directly, or via Red Hat JBoss Enterprise Web Server/RHEL and NetApp bundled-product advisories), prioritizing internet-facing Windows servers since the issue is KEV-listed with known ransomware use. If patching must be delayed, ensure the Default servlet readonly parameter remains at its default (true) to disable PUT, or block PUT requests at a reverse proxy/WAF on Windows Tomcat hosts. Also check affected Windows hosts for unexpectedly uploaded .jsp files and review access logs for PUT requests that created JSPs, as indicators of compromise.

8.1
group max
100% KEV ransomware PoC ×2
  • Apache Tomcat 7.0.0 – 7.0.79 on Windows with HTTP PUT enabled (Default servlet readonly=false)
  • netapp 7-Mode Transition Tool bundled/embedded Tomcat 7.0.0 – 7.0.79 per NetApp advisory (version range not specified in data)
  • netapp OnCommand Balance bundled/embedded Tomcat 7.0.0 – 7.0.79 per NetApp advisory (version range not specified in data)
  • +9 more
large≈10,000–100,000 exposed systems (Tomcat 7 on Windows with non-default PUT enabled)
CVE-2017-12617
Apache Tomcat Remote Code Execution Vulnerability

CVE-2017-12617 is a file-upload vulnerability (CWE-434) in Apache Tomcat in which a specially crafted request can upload a JSP file to the server, and any code in that file is executed when the file is later requested, enabling remote code execution. Any organization running an affected version of Apache Tomcat is exposed. Because it allows arbitrary code execution on the web server, it can lead to full server compromise, and it is listed in CISA's Known Exploited Vulnerabilities catalog with a maximal 100% EPSS probability of exploitation within 30 days.

Do: Apply updates to Apache Tomcat per vendor instructions, which is the required action for this CISA KEV-listed vulnerability. Prioritize patching internet-facing Tomcat instances given the very high likelihood of exploitation, and review patched servers for unexpected or recently created JSP files that could indicate prior exploitation.

8.1100% KEV
  • Apache Tomcat
Full article419 words · extracted from securityaffairs.com · click to collapse

Several security vulnerabilities have been patched in recent weeks in Apache Tomcat, including the CVE-2017-12617 Code Execution vulnerability.

Several security vulnerabilities have been patched in recent weeks in Apache Tomcat. The list of fixed flaws recently addressed also included code execution vulnerabilities.

Apache Tomcat is the most widely used web application server, with over one million downloads per month and over 70% penetration in the enterprise datacenter.

On Tuesday, the Apache Tomcat development team publicly disclosed the presence of a remote code execution vulnerability, tracked as CVE-2017-12617, affecting the popular web application server. The Tomcat versions 9.x, 8.5.x, 8.0.x and 7.0.x are affected by the flaw.

The vulnerability classified as “important” severity, has been fixed in the versions 9.0.1, 8.5.23, 8.0.47 and 7.0.82.

The vulnerability only affected systems that have the HTTP PUT method enabled, it could be exploited by attackers to upload a malicious JSP file to a targeted server using a specially crafted request. Once the file has been uploaded, the code it contains could be executed by requesting the file.

Fortunately, the extent of the flaw is limited by the fact that it could be triggered only on the default servlet configured with the readonly parameter set to false or the WebDAV servlet enabled with the readonly  parameter set to false.

“When running with HTTP PUTs enabled (e.g. via setting the read-only initialisation parameter of the Default servlet to false) it was possible to upload a JSP file to the server via a specially crafted request. This JSP could then be requested and any code it contained would be executed by the server.” states the security advisory.

apache tomcat

“This configuration would allow any unauthenticated user to upload files (as used in WebDAV). It was discovered that the filter that prevents the uploading of JavaServer Pages (.jsp) can be circumvented. So JSPs can be uploaded, which then can be executed on the server.” wrote the security researcher Peter Stöckli.

“Now since this feature is typically not wanted, most publicly exposed system won’t have readonly set to false and are thus not affected.”

Stöckli highlighted the similarities between the CVE-2017-12617 flaw and the CVE-2017-12615 vulnerability that was fixed on September 19 with the release of version 7.0.81.

The Apache Tomcat 7 update released in September also addressed the CVE-2017-12616 that could be exploited by attackers to bypass security constraints and view the source code of JSPs via a specially crafted request.

[adrotate banner=”9″] [adrotate banner=”12″]

Pierluigi Paganini

(Security Affairs – CVE-2017-12617, Tomcat)

[adrotate banner=”5″]

[adrotate banner=”13″]



Text extracted automatically; images, tables and formatting may be missing. Original: https://securityaffairs.com/63845/hacking/cve-2017-12617-tomcat-flaw.html