CVE DatabaseCVE-2017-12617
한국어 권고문 →
CVE-2017-126178.1/HIGHCISA KEVCWE-434CWE-434

Apache Tomcat Remote Code Execution Vulnerability via DefaultServlet readonly Parameter Misconfiguration (CVE-2017-12617)

⚡ Jump to Patch
Affected Vendors
apache
Affected Components
tomcat
Published Date
2017-10-04
CVSS v3.1
8.1
HIGH
EPSS (30d)
100.0%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

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 when the 'readonly' parameter of the DefaultServlet is set to false

Impact

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

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)

Affected Products & Version Scope

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)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. 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.

bash
# 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 tomcat

2. 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).

xml
<!-- 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.

bash
# 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 -ls
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Cloudflare Enterprise & Pro WAF
Immediately audit your Tomcat web.xml configurations to ensure 'readonly' is set to 'true' and restrict HTTP PUT methods at the network or WAF level.

Block 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.

3-min setup · Automated Zero-Day Managed Rules
Practice Exploiting & Patching This Web Vulnerability in an Interactive Lab
Launch Hands-On Security Lab

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

Frequently Asked SecOps Questions (CVE-2017-12617)

FAQ

Q1. 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.

SECOPS WORKBENCH INTEGRATION

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.

Generate Report →

🔗 Related Advisories in Similar Stack (apache)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2017-12617 Apache Tomcat Remote Code Execution Vulnerability via DefaultServlet readonly Parameter Misconfiguration (CVE-2017-12617) (CVSS 8.1) - Patch & Workaround | CVE Pulse