UCF STIG Viewer Logo

HAProxy must provide default error files.


Overview

Finding ID Version Rule ID IA Controls Severity
V-89177 VRAU-HA-000315 SV-99827r1_rule Medium
Description
Information needed by an attacker to begin looking for possible vulnerabilities in a web server includes any information about the web server, backend systems being accessed, and plug-ins or modules being used. Web servers will often display error messages to client users displaying enough information to aid in the debugging of the error. The information given back in error messages may display the web server type, version, patches installed, plug-ins and modules installed, type of code being used by the hosted application, and any backends being used for data storage. This information could be used by an attacker to blueprint what type of attacks might be successful. The information given to users must be minimized to not aid in the blueprinting of the web server.
STIG Date
VMW vRealize Automation 7.x HA Proxy Security Technical Implementation Guide 2018-10-12

Details

Check Text ( C-88869r1_chk )
At the command prompt, execute the following command:

grep 'errorfile' /etc/haproxy/haproxy.cfg

If the return value for "errorfile" does not list error pages for the following HTTP status codes, this is a finding.

400, 403, 408, 500, 502, 503, 504
Fix Text (F-95919r2_fix)
Create error pages for each of the HTTP status codes below:

400, 403, 408, 500, 502, 503, 504

Navigate to and open /etc/haproxy/haproxy.cfg. Navigate to the "defaults" section.

Add the following lines:

errorfile 400 /path/to/errorPage/for/400.http
errorfile 403 /path/to/errorPage/for/403.http
errorfile 408 /path/to/errorPage/for/408.http
errorfile 500 /path/to/errorPage/for/500.http
errorfile 502 /path/to/errorPage/for/502.http
errorfile 503 /path/to/errorPage/for/503.http
errorfile 504 /path/to/errorPage/for/504.http