1. Home
  2. Security Hardening
  3. DISA STIG Apache Tomcat Application Server 9 V2R3 Middleware
  4. TCAT-AS-000090 – DefaultServlet must be set to readonly for PUT and DELETE.

TCAT-AS-000090 – DefaultServlet must be set to readonly for PUT and DELETE.

Details

The DefaultServlet is a servlet provided with Tomcat. It is called when no other suitable page can be displayed to the client. The DefaultServlet serves static resources as well as directory listings and is declared globally in $CATALINA_BASE/conf/web.xml. By default, Tomcat behaves as if the DefaultServlet is set to ‘true’ (HTTP commands like PUT and DELETE are rejected). However, the readonly parameter is not in the web.xml file by default so to ensure proper configuration and system operation, the ‘readonly’ parameter in web.xml must be created and set to ‘true’. Creating the setting in web.xml provides assurances the system is operating as required. Changing the readonly parameter to false could allow clients to delete or modify static resources on the server and upload new resources.

Solution

From the Tomcat server console as a privileged user:

Edit the $CATALINA_BASE/conf/web.xml file.

If the ‘readonly’ param-value does not exist, it must be created.

Ensure the ‘readonly’ param-value for the ‘DefaultServlet’ servlet class = ‘true’.

Supportive Information

The following resource is also helpful.

This security hardening control applies to the following category of controls within NIST 800-53: Access Control.This control applies to the following type of system Unix.

References

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles