CGI-BIN directory should be disabled. 'Directory'

Information

CGI-BIN directory is used to host CGI pages. CGI if not properly configured can enable execution of malicious scripts on the server.

Solution

Disable CGI on websites that do not use any CGI scripts and programs. Comment out the following lines in httpd.conf file as shown below:
# LoadModule cgi_module modules/mod_cgi.so
# Loadmodule env_module modules/mod_env.so
# AddModule mod_env.c
# Addmodule mod_cgi.c
# ScriptAlias /cgi-bin/ '/var/www/cgi-bin/'
# <Directory '/var/www/cgi-bin'>
# AllowOverride None
# Options None
# Order allow, deny
# Allow from all
# </Directory>

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-7b.

Plugin: Unix

Control ID: b7ea9aa252ca36882b2f5cd3244a95f02d23a12a2ba91725ad2e97ec77e062fb