What Is Apache Tomcat?
Apache Tomcat is the most widely deployed Java web application server in the world, used by enterprises, cloud providers, and developers to run Java Servlet and JSP applications. Tomcat's DefaultServlet handles HTTP requests for static files and can optionally allow file uploads via HTTP PUT. CVE-2017-12615 exploits a Windows-specific quirk in how Tomcat handles PUT requests with trailing slashes to upload JSP web shells — providing immediate remote code execution on any Tomcat deployment where HTTP PUT is enabled on Windows.
Overview
CVE-2017-12615 is a remote code execution vulnerability in Apache Tomcat on Windows caused by improper handling of HTTP PUT requests with trailing path characters. When the DefaultServlet is configured with write permissions enabled, an attacker can upload a JSP file by including a trailing / or %20 in the PUT request URL — bypassing Tomcat's file extension checks. The uploaded JSP is immediately accessible via HTTP and executes in the Tomcat JVM when requested. Fixed in Apache Tomcat 7.0.81. The companion vulnerability CVE-2017-12617 extends JSP upload to all platforms. CISA added CVE-2017-12615 to the KEV catalog in March 2022 reflecting confirmed ransomware use.
Affected Versions
| Tomcat Version | Status |
|---|---|
| Apache Tomcat 7.0.0 through 7.0.79 (Windows only) | Vulnerable |
| Apache Tomcat 7.0.81 and later | Fixed |
Note: HTTP PUT must be enabled via readonly=false in the DefaultServlet configuration. While not the default in stock Tomcat, many enterprise configurations and deployment guides enable it.
Technical Details
Root Cause: Windows Trailing Slash Bypass in HTTP PUT Handler
CVE-2017-12615 is an unrestricted upload vulnerability (CWE-434) in Apache Tomcat's DefaultServlet. The attack exploits a Windows filesystem behavior:
- HTTP PUT enabled: The Tomcat DefaultServlet is configured with
readonly=false(allowing HTTP PUT) - Extension bypass: Tomcat checks the uploaded filename's extension to prevent JSP uploads; however, on Windows, a PUT request to
/shell.jsp/(trailing slash) or/shell.jsp%20(URL-encoded space) bypasses this check - Windows creates the file correctly: Windows strips the trailing slash/space and creates the file as
shell.jspon disk - JSP execution: A subsequent GET request to
/shell.jspcauses Tomcat to compile and execute the JSP, achieving code execution
Exploitation simplicity:
The attack requires only two HTTP requests — one PUT to upload the shell, one GET to execute it. Tools like curl can execute the exploit in seconds once the target is identified.
Attack Characteristics
| Attribute | Detail |
|---|---|
| Attack Vector | Network — HTTP PUT to Tomcat DefaultServlet |
| Authentication | None required (if PUT is publicly accessible) |
| Platform | Windows only (CVE-2017-12617 covers all platforms) |
| Payload | JSP web shell → arbitrary Java code execution |
| Ransomware | Confirmed — used for ransomware delivery |
Discovery
Discovered and published alongside the Tomcat 7.0.81 patch; proof-of-concept code was released within days, leading to rapid mass exploitation.
Exploitation Context
- Rapid mass exploitation: After PoC release, mass scanning and exploitation campaigns targeted exposed Tomcat deployments globally; automated scripts scanned for Tomcat on ports 8080, 8443, and 443 and attempted JSP upload immediately
- Ransomware delivery: Ransomware operators used CVE-2017-12615 to establish web shell access to Tomcat servers hosting enterprise Java applications, providing persistent RCE foothold for lateral movement and ransomware deployment; CISA's
ransomwareUse: truereflects confirmed campaigns - Related CVE-2017-12617: CVE-2017-12617 is a closely related vulnerability that affects all platforms (not just Windows) and was patched in Tomcat 8.5.24, 9.0.1; organizations running Tomcat 8.x and 9.x should patch CVE-2017-12617 as well
- Enterprise Tomcat exposure: Many enterprise Java deployments exposed Tomcat management interfaces to internal networks with HTTP PUT enabled for deployment automation; attackers with internal network access exploited CVE-2017-12615 for lateral movement
- CISA KEV (2022): Added March 2022 reflecting ongoing exploitation of unpatched Tomcat deployments
Remediation
-
Upgrade Apache Tomcat — update to Tomcat 7.0.81 or later to patch CVE-2017-12615. Also update Tomcat 8.x to 8.5.24+ and Tomcat 9.x to 9.0.1+ to patch the companion CVE-2017-12617.
-
Disable HTTP PUT (DefaultServlet readonly) — if file upload via HTTP PUT is not required, ensure the DefaultServlet is configured with
readonly=true(the default):<!-- In web.xml DefaultServlet init-param: --> <init-param> <param-name>readonly</param-name> <param-value>true</param-value> </init-param> -
Scan for uploaded JSP web shells — check the Tomcat webapps directory for recently created
.jspand.jspxfiles that were not part of the original application deployment. -
Restrict network access to Tomcat — place Tomcat behind a reverse proxy (Apache httpd, nginx) that does not forward HTTP PUT requests; direct internet exposure of Tomcat's HTTP port increases exploitation risk.
-
Monitor for JSP compilation events — alert on Tomcat logs showing JSP compilation of unexpected files; web shell access produces characteristic log patterns.
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2017-12615 |
| Vendor / Product | Apache — Tomcat |
| NVD Published | 2017-09-19 |
| NVD Last Modified | 2025-10-22 |
| CVSS 3.1 Score | 8.1 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CWE | CWE-434 — Unrestricted Upload of File with Dangerous Type find similar ↗ |
| CISA KEV Added | 2022-03-25 |
| CISA KEV Deadline | 2022-04-15 |
| Known Ransomware Use | ⚠️ Yes |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2017-09-19 | CVE-2017-12615 published; Apache Tomcat 7.0.81 released patching the Windows JSP upload vulnerability |
| 2017-09-21 | Proof-of-concept exploit published; rapid adoption by attackers |
| 2022-03-25 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2022-04-15 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2017-12615 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |
| Apache Tomcat 7.x Security Fixes | Vendor Advisory |