Host Header Attac
The application trusts the Forwarded header's host value, so an attacker can make it redirect users to an arbitrary domain. This enables phishing and potentially cache poisoning.
- Triaged in 4 months
- Fixed in 6 months
- Disclosed after 6 months
The application is vulnerable to Host Header Injection. An attacker can manipulate the Host header to redirect users to arbitrary domains or potentially poison web caches. Steps to reproduce:
- Navigate to https://rubygems.org/ and intercept the request.
- Add header ==Forwarded: host=evil.com== and forward the request.
- Notice you will be redirect to attacker's malicious website.
Impact
Successful exploitation can lead to user redirection to malicious sites, phishing attacks, and potential data loss. The overall impact of a Host Header attack can be significant, leading to financial loss, reputational damage, and legal consequences. It's crucial to address this vulnerability promptly to protect users and systems.
Attachments
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application uses the client-supplied Forwarded header host value when constructing redirect URLs without validating it against an allowlist.
Impact
Users could be redirected to malicious sites for phishing, and the text claims possible cache poisoning, though no cache behaviour is demonstrated.
What the attacker needed
Ability to intercept and modify requests
The fix
The application should not trust client-supplied host values in the Forwarded header when building redirects.
How it was found
- Go to the site and intercept the request.
- Add a Forwarded header with an attacker-controlled host value.
- Forward the request and observe the redirect to the attacker's site.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you visit a website, your browser sends a 'Host' header saying which site you want. Some apps also read a 'Forwarded' header that proxies add. Here the app believed the host value from that header and used it to build a redirect, so an attacker could send victims to a fake site.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.