Apache Tomcat Remote Code Execution Vulnerability via DefaultServlet readonly Parameter Misconfiguration (CVE-2017-12617)
Executive & SecOps Summary
SECOPS ASSESSMENTApache Tomcat versions 9.0.0.M1 to 9.0.0, 8.5.0 to 8.5.22, 8.0.0.RC1 to 8.0.46, and 7.0.0 to 7.0.81 when the 'readonly' parameter of the DefaultServlet is set to false
Unauthenticated remote attackers can upload malicious JSP files using crafted HTTP PUT requests, leading to arbitrary code execution with the privileges of the Tomcat process
Upgrade Apache Tomcat to the latest secure versions, or modify the web.xml configuration to ensure the 'readonly' parameter is set to true (default)
Affected Products & Version Scope
Remediation & Live Workaround Commands
PATCH & WORKAROUND1. Official Patch & Version Upgrade Commands
The recommended remediation is to upgrade Apache Tomcat to a non-vulnerable version (9.0.1, 8.5.23, 8.0.47, 7.0.82, or later). Below are the commands to upgrade Tomcat on a Linux-based system.
# Check the currently running Tomcat version
/usr/share/tomcat/bin/version.sh
# Download and extract the secure version (e.g., 8.5.99)
wget https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.99/bin/apache-tomcat-8.5.99.tar.gz
tar -zxvf apache-tomcat-8.5.99.tar.gz -C /usr/share/
# Update the symbolic link and restart the service
rm -f /usr/share/tomcat
ln -s /usr/share/apache-tomcat-8.5.99 /usr/share/tomcat
systemctl restart tomcat2. Temporary Workaround & Hardening Configuration
If an immediate upgrade is not feasible, secure the web.xml configuration file by ensuring the readonly parameter is set to true (or completely removing the parameter to fall back to the default secure behavior).
<!-- Edit conf/web.xml or application-specific web.xml -->
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>readonly</param-name>
<!-- Force readonly to true to disable HTTP PUT/DELETE methods -->
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>3. Log Audit & IoC Verification Commands
Use the following commands to inspect Tomcat access logs for suspicious HTTP PUT requests and scan the web directory for unauthorized JSP files.
# Scan Tomcat access logs for HTTP PUT requests targeting JSP files
grep -i 'PUT.*\.jsp' /var/log/tomcat*/localhost_access_log*.txt
# Search for recently modified or created JSP files in the webapps directory
find /usr/share/tomcat/webapps/ -name '*.jsp' -mtime -30 -lsBlock Exploits Instantly with Managed Virtual Patching Rules
Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.
Technical Root Cause & Exploitation Mechanics
1. Vulnerability Overview & Root Cause
This vulnerability (CVE-2017-12617) arises when Apache Tomcat is configured with the 'readonly' initialization parameter of the DefaultServlet set to 'false'. By default, Tomcat sets this parameter to 'true' to prevent external clients from modifying resources on the server. When set to 'false', Tomcat permits HTTP PUT requests. Although Tomcat has built-in mechanisms to reject direct uploads of JSP files, attackers can bypass these restrictions by exploiting file-system behaviors (such as appending a trailing slash '/' or NTFS alternative data streams '::$DATA' on Windows), allowing them to write arbitrary JSP files directly to the web root.
2. Exploitation Mechanics & Attack Scenario
An attacker initiates the exploit by sending an HTTP PUT request containing a malicious JSP payload (WebShell). To bypass Tomcat's extension validation, the attacker crafts the request URI to target a path like /shell.jsp/ or /shell.jsp::$DATA. During the file creation process, the underlying file system or Tomcat's internal file-writing APIs strip the trailing slash or stream identifier, resulting in the creation of a standard shell.jsp file on the disk. Once the file is successfully written, the attacker sends an HTTP GET request to the uploaded JSP file, triggering the execution of the payload within the WAS context and achieving Remote Code Execution (RCE).
3. Infrastructure & Business Impact
Given its inclusion in the CISA KEV catalog and an EPSS score of 0.9997, this vulnerability is highly targeted by automated exploit scripts. Successful exploitation grants the attacker the execution privileges of the Tomcat daemon (often root or SYSTEM). This can lead to complete host compromise, lateral movement within the internal network, database credential theft, and deployment of ransomware, posing a catastrophic risk to business continuity.
Official Vendor Advisories & References
When running Apache Tomcat versions 9.0.0.M1 to 9.0.0, 8.5.0 to 8.5.22, 8.0.0.RC1 to 8.0.46 and 7.0.0 to 7.0.81 with HTTP PUTs enabled (e.g. via setting the readonly 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.
Frequently Asked SecOps Questions (CVE-2017-12617)
FAQQ1. How critical is CVE-2017-12617 and is it actively exploited in the wild?
CVE-2017-12617 is rated CVSS 8.1 (HIGH) with a 30-day EPSS exploitation probability of 100.0%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.
Q2. Which vendors and products are affected by CVE-2017-12617?
Primary impacted vendors include apache across tomcat. Scope summary: Apache Tomcat 9.0.0.M1 to 9.0.0, 8.5.0 to 8.5.22, 8.0.0.RC1 to 8.0.46, and 7.0.0 to 7.0.81 (when readonly is set to false)
Q3. What temporary mitigations or workarounds exist for CVE-2017-12617 before patching?
[Mitigation] Upgrade Apache Tomcat to the latest secure versions, or modify the web.xml configuration to ensure the 'readonly' parameter is set to true (default) Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.
Generate an Internal Engineering Notice or CISO Report for CVE-2017-12617
Instantly format this advisory into an executive CISO summary or engineering patch ticket.
🔗 Related Advisories in Similar Stack (apache)
View Category →Apache Tomcat EncryptInterceptor Bypass and Sensitive Data Exposure Vulnerability (CVE-2026-34486)
[Affected Scope] Apache Tomcat versions 11.0.20, 10.1.53, and 9.0.116 utilizing clustering with EncryptInterceptor enabled
Apache Tomcat EncryptInterceptor Padding Oracle Vulnerability (CVE-2026-29146) Security Advisory
[Affected Scope] Apache Tomcat deployments utilizing `EncryptInterceptor` with default configurations for cluster membership protection (11.0.0-M1 to 11.0.18, 10.0.0-M1 to 10.1.52, 9.0.13 to 9.0.115, 8.5.38 to 8.5.100, 7.0.100 to 7.0.109).
Apache ActiveMQ Jolokia JMX-HTTP Bridge Remote Code Execution Vulnerability Advisory (CVE-2026-34197)
[Affected Scope] Apache ActiveMQ Classic versions prior to 5.19.4, and 6.0.0 through 6.2.3
Joomla Page Builder CK Extension Unauthenticated Remote Code Execution (RCE) Vulnerability (CVE-2026-56290)
[Affected Scope] Joomla Page Builder CK extension versions prior to 3.6.0
Subscribe to Daily Vulnerability Briefings & KEV Alerts
Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.