Rule ID
Category
Level
Compatible Versions
Description
- The
Server and X-Powered-By headers can reveal the underlying technology used by an application. If not explicitly configured, NGINX reverse proxy can strip these headers by using proxy_hide_header.
Scan Frequency
Rationale
- Attackers can use these response headers to perform reconnaissance on a website, then target specific known vulnerabilities associated with the underlying technology. Removing these headers reduces the likelihood of targeted attacks.
Risk Item
Audit Method
- Execute the following command to verify:
grep proxy_hide_header /etc/nginx/nginx.conf
# Expected output:
proxy_hide_header X-Powered-By;
# If not present, it is recommended to add it.
- Edit the file
/etc/nginx/nginx.conf and add the header directives. Example:
location /docs {
....
proxy_hide_header X-Powered-By;
proxy_hide_header Server;
....
}
Impact
Default Value
- By default, this configuration is not present.
References
CIS Controls