Vulnerabilities/

Apache Tomcat JSP Upload RCE

Impact: High

Description

When running on Windows with HTTP PUTs enabled (e.g. via setting the readonly initialisation parameter of the Default 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.

Recommendation

Upgrade to Apache Tomcat to the latest stable version. Then make sure the readonly is set to true in the configurations like below example:

<servlet>
  <servlet-name>HelloWorld</servlet-name>
  <servlet-class>HelloWorldServlet</servlet-class>
  <init-param>
      <param-name>readonly</param-name>
      <param-value>false</param-value>
  </init-param>
</servlet>

References

Last updated on June 06, 2022

This issue is available in SmartScanner Professional

See Pricing