Host Header Injection

Host Header Injection

Knowledge Base>Host Header Injection

Summary

Host Header Injection allows an attacker to manipulate the Host header of an HTTP request, leading to potential security bypass, cache poisoning, or session fixation.

Testing methodology

X-Originating-IPX-Forwarded-ForX-Remote-IPX-Forwarded-HostX-Client-IP2 Host headersHeader is Used in Reset LinkHeader is Used by Server to Generate HTTP RequestHeader is Used for Cached ContentRestriction Bypass via Injected Header
Identify Used Headers
Interaction with Server
Web Cache Poisoning
Password Reset Poisoning
SSRF
Access Restricted Interface

Description

Host Header Injection is a vulnerability that occurs when an attacker can manipulate the Host header of an HTTP request sent to a web application. By injecting a malicious or manipulated Host header, attackers can bypass security controls, poison caches, perform session fixation attacks, or redirect traffic to malicious servers.

Host Header Injection can lead to unauthorized access, sensitive information exposure, or compromise of user sessions.

Remediations

  • Implement strict validation and sanitization of user-controlled input used in the Host header.
  • Use server-side configurations or web application firewalls to enforce restrictions on the Host header values.
  • Perform proper input validation on redirect targets and ensure they are from trusted sources.
  • Implement secure session management techniques, such as session token regeneration, to mitigate session fixation attacks.

By using this site you agree to our Terms of Service and Privacy Policy.