Apache Tomcat 8.5.19 | CVE-2017–12617
Apache Tomcat 8.5.19 was running with the readonly parameter set to false, which allows the HTTP PUT method to upload files. An attacker could upload a JSP reverse shell and execute commands on the server.
medium.com
Published on medium.com
Apache Tomcat 8.5.19 sürümünde, readonly parametresinin false olarak ayarlandığı durumlarda geçerli olan CVE-2017-12617 zafiyeti bulunduğunu görüyoruz.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Tomcat readonly setting was disabled, so the default servlet accepted PUT requests and wrote attacker-supplied JSP files into a web-accessible directory.
Impact
An attacker could upload and execute a JSP reverse shell, gaining command execution on the server.
What the attacker needed
Tomcat readonly set to false; Network access to port 8080; Attacker can reach the uploaded file
The fix
The readonly parameter should be left at its default true value, or the default servlet should be configured to reject PUT requests.
How it was found
- Scan the host and find Apache Tomcat 8.5.19 on port 8080
- Run a directory scan to look for possible subdirectories
- Identify CVE-2017-12617 as applicable to this version
- Upload a JSP reverse shell file using the PUT method
- Start a listener and request the uploaded JSP file to get a shell
- Confirm the readonly parameter is set to false in the Tomcat configuration
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Tomcat is a Java web server. A setting called readonly was turned off, which let anyone upload files to the server over HTTP. Because uploaded JavaServer Pages (JSP) files are run as code, the attacker could upload a small program that gave them a command shell on the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.