Information
Restrict unnecessary HTTP request methods such as PUT and DELETE.
Rationale:
The HTTP 1.1 protocol supports several request methods which are rarely used and potentially high risk. For example, methods such as PUT and DELETE are rarely used and should be disabled in keeping with the primary security principle of minimize features and options. Also since the usage of these methods is typically to modify resources on the Tomcat server, they should be explicitly disallowed.
Solution
Perform the following to prevent Tomcat from accepting PUT or DELETE methods:
Locate web.xml under $CATALINA_HOME/conf
Find the init param readonly, remove it or set its value with true
<init-param>
<param-name>readonly</param-name>
<param-value>true</param-value>
</init-param>
Impact:
Applications which use PUT and DELETE may be impacted by this recommendation.
Default Value:
By default, the value of readonly is true.
References:
https://tomcat.apache.org/tomcat-8.0-doc/default-servlet.html