CVE-2017-12615: Apache Tomcat on Windows Remote Code Execution Vulnerability
A vulnerability was discovered in Tomcat where if a servlet context was configured with readonly=false and HTTP PUT requests were allowed, an attacker could upload a JSP file to that context and achieve code execution.
Other sources
When running Apache Tomcat 7.0.0 to 7.0.79 on Windows with HTTP PUTs enabled (e.g. via setting the readonly initialisation parameter of the Default 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.
When running Apache Tomcat on Windows with HTTP PUTs enabled, it is 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.
— CISA
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/tomcat6to a version that resolves this vulnerability.Fixed in 0:6.0.24-111.el6_9 - Upgrade
Upgrade
redhat/tomcatto a version that resolves this vulnerability.Fixed in 0:7.0.76-3.el7_4 - Upgrade
Upgrade
redhat/httpdto a version that resolves this vulnerability.Fixed in 0:2.2.26-57.ep6.el6 - Upgrade
Upgrade
redhat/jbcs-httpd24-opensslto a version that resolves this vulnerability.Fixed in 1:1.0.2h-14.jbcs.el6 - Upgrade
Upgrade
redhat/tomcat6to a version that resolves this vulnerability.Fixed in 0:6.0.41-19_patch_04.ep6.el6 - Upgrade
Upgrade
redhat/tomcat7to a version that resolves this vulnerability.Fixed in 0:7.0.54-28_patch_05.ep6.el6 - Upgrade
Upgrade
redhat/httpd22to a version that resolves this vulnerability.Fixed in 0:2.2.26-58.ep6.el7 - Upgrade
Upgrade
redhat/jbcs-httpd24-opensslto a version that resolves this vulnerability.Fixed in 1:1.0.2h-14.jbcs.el7 - Upgrade
Upgrade
redhat/tomcat6to a version that resolves this vulnerability.Fixed in 0:6.0.41-19_patch_04.ep6.el7 - Upgrade
Upgrade
redhat/tomcat7to a version that resolves this vulnerability.Fixed in 0:7.0.54-28_patch_05.ep6.el7 - Upgrade
Upgrade
redhat/tomcat7to a version that resolves this vulnerability.Fixed in 0:7.0.70-25.ep7.el6 - Upgrade
Upgrade
redhat/tomcat8to a version that resolves this vulnerability.Fixed in 0:8.0.36-29.ep7.el6 - Upgrade
Upgrade
redhat/tomcat-nativeto a version that resolves this vulnerability.Fixed in 0:1.2.8-11.redhat_11.ep7.el6 - Upgrade
Upgrade
redhat/tomcat-vaultto a version that resolves this vulnerability.Fixed in 0:1.1.6-1.Final_redhat_1.1.ep7.el6 - Upgrade
Upgrade
redhat/tomcat7to a version that resolves this vulnerability.Fixed in 0:7.0.70-25.ep7.el7 - Upgrade
Upgrade
redhat/tomcat8to a version that resolves this vulnerability.Fixed in 0:8.0.36-29.ep7.el7 - Upgrade
Upgrade
redhat/tomcat-nativeto a version that resolves this vulnerability.Fixed in 0:1.2.8-11.redhat_11.ep7.el7 - Upgrade
Upgrade
redhat/tomcat-vaultto a version that resolves this vulnerability.Fixed in 0:1.1.6-1.Final_redhat_1.1.ep7.el7 - Upgrade
Upgrade
redhat/tomcatto a version that resolves this vulnerability.Fixed in 7.0.81 - Upgrade
Upgrade
maven/org.apache.tomcat.embed:tomcat-embed-coreto a version that resolves this vulnerability.Fixed in 7.0.79 - Configuration
Set the servlet context (including the DefaultServlet, WebDAV servlet, or the application context) initialization parameter readonly to true (default) to prevent uploading a JSP via PUT when writable contexts are configured.
Apache Tomcat (servlet context / DefaultServlet / WebDAV servlet / application context) readonly = true - Configuration
Block HTTP methods that permit resource modification (specifically block/disable HTTP PUT requests) for untrusted users to prevent JSP upload and subsequent code execution.
Apache Tomcat (HTTP connector / request handling) HTTP PUT requests = blocked
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2017-12615?
CVE-2017-12615 has been assigned a medium severity rating due to the potential for unauthorized code execution through malicious file uploads.
How do I fix CVE-2017-12615?
To fix CVE-2017-12615, upgrade Apache Tomcat to version 7.0.81 or later.
What versions of Tomcat are affected by CVE-2017-12615?
Versions of Apache Tomcat from 7.0.0 to 7.0.79 are affected by CVE-2017-12615.
Is this vulnerability specific to certain operating systems?
CVE-2017-12615 specifically affects Apache Tomcat running on Windows systems.
Can CVE-2017-12615 be exploited remotely?
Yes, CVE-2017-12615 can be exploited remotely if the server allows HTTP PUT requests to a servlet context configured with readonly=false.