AS24-U2-000350 - Users and scripts running on behalf of users must be contained to the document root or home directory tree of the Apache web server.

Information

A web server is designed to deliver content and execute scripts or applications on the request of a client or user. Containing user requests to files in the directory tree of the hosted web application and limiting the execution of scripts and applications guarantees that the user is not accessing information protected outside the application's realm.

The web server must also prohibit users from jumping outside the hosted application directory tree through access to the user's home directory, symbolic links or shortcuts, or through search paths for missing files.

Solution

Determine the location of the 'HTTPD_ROOT' directory and the 'httpd.conf' file:

# apachectl -V | egrep -i 'httpd_root|server_config_file'
-D HTTPD_ROOT='/etc/httpd'
-D SERVER_CONFIG_FILE='conf/httpd.conf'

Set the root directory directive as follows:

<Directory>
...
Require all denied
...
</Directory>

Remove any 'Deny' and 'Allow' directives from the root <Directory> element.

Restart Apache: apachectl restart

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Apache_Server_2-4_Unix_Y24M07_STIG.zip

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-7a., CAT|II, CCI|CCI-000381, Rule-ID|SV-214284r881481_rule, STIG-ID|AS24-U2-000350, STIG-Legacy|SV-102867, STIG-Legacy|V-92779, Vuln-ID|V-214284

Plugin: Unix

Control ID: 6367fe2d908d5952f401be86cf03c7d4e26cb834703fa952fafb46dec9818078