The 'X-Varnish-Backend' header reveals the backend server or service used by Varnish Cache, potentially disclosing internal hostnames, routing details, or architecture specifics. Attackers who learn this information could craft tailored exploits to target particular backend nodes, bypass certain security controls, or perform cache poisoning. Exposing internal routing logic can also aid in reconnaissance, allowing adversaries to map your infrastructure and focus on known vulnerabilities or configurations for the identified backend. Ultimately, leaking 'X-Varnish-Backend' broadens your application's attack surface by offering direct insight into how requests are routed and which servers handle them.
Remove or mask the 'X-Varnish-Backend' header so that external clients do not learn about internal server details. Configure Varnish Cache to strip or rewrite technology-identifying headers in production environments. Keep your backend servers and any caching layers up to date with security patches to minimize the risk of exploited flaws. Consider deploying a Web Application Firewall (WAF) or intrusion detection system to detect malicious traffic aimed at manipulating cached data or targeting specific backend nodes. Regularly audit your Varnish configurations and logs to confirm that internal hostnames, routing details, or backend references are not inadvertently exposed in response headers.
Code: A05:2021
Category: Security Misconfiguration
5.3
5.3