Vulnerability library
Security checkMay 13, 2024

Host Header Injection

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severity

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

During the processing of an incoming HTTP request, the web server relies on the Host HTTP header to determine which component or virtual host should handle the request. However, since all HTTP headers, including the Host header, are user-controlled data, if the application uses the value of any HTTP header without proper validation, it becomes vulnerable to header injection attacks. Host header injection enables attackers to manipulate the response, leading to potential security risks such as arbitrary redirection, cache poisoning, and information disclosure.

Test for Host Header Injection Vulnerability with SmartScanner

Donwload FREE!

Recommendation

To mitigate the risk of host header injection, avoid relying solely on the value of headers for critical operations. If it’s necessary to use header values, ensure that only whitelisted values are accepted.

References

Could your website be exposed too?

SmartScanner can check your website for Host Header Injection and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated May 13, 2024