Header Injection In app.legalrobot.com
The sign-in endpoint used the attacker-supplied Host header to build a 301 redirect Location, sending the request to that domain.
- Disclosed after 5 months
As per policy header injection are low priority bug but i recently discovered that when attacker change host to a special domain then victim will be redirect there....
My Request :
GET /sign-in HTTP/1.1 Host: app.legalrobot.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Cookie: __cfduid=d89f1b742903f9fedf12446b6bf8c8af51503233541; _ga=GA1.2.77695220.1503233606; ajs_user_id=%22jB5saN68Z69Dd64Rp%22; ajs_group_id=null; ajs_anonymous_id=%2271e53feb-3f14-49bc-acf8-25c0b9255d72%22; intercom-id-nmyyq5i5=ec9d124c-3c23-4608-9a39-f903db254744; _gat=1 Connection: close Upgrade-Insecure-Requests: 1
200 RESPONSE
CHANGED HOST TO XNXX.COM ..SO REQUEST :
GET /sign-in HTTP/1.1 Host: xnxx.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Cookie: __cfduid=d89f1b742903f9fedf12446b6bf8c8af51503233541; _ga=GA1.2.77695220.1503233606; ajs_user_id=%22jB5saN68Z69Dd64Rp%22; ajs_group_id=null; ajs_anonymous_id=%2271e53feb-3f14-49bc-acf8-25c0b9255d72%22; intercom-id-nmyyq5i5=ec9d124c-3c23-4608-9a39-f903db254744; _gat=1 Connection: close Upgrade-Insecure-Requests: 1
RESPONSE :
HTTP/1.1 301 Moved Permanently Date: Tue, 29 Aug 2017 18:29:20 GMT Content-Type: text/html; charset=iso-8859-1 Connection: close Location: http://www.xnxx.com/sign-in Vary: Accept-Encoding Server: cloudflare-nginx CF-RAY: 3961933e8d168860-BOM Content-Length: 235
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="http://www.xnxx.com/sign-in">here</a>.</p> </body></html>It's 301 so it should not allow to moved permenanlty to a different domain this may lead to some serious attacking senario...
as fix we can block xnxx and other impactfull host
ps: please use xnxx.com only ( as a purpose use facebook.com and others domain also but there os no redirect ) we can find many domain as xnxx.com so there must be a strict waf ..
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 built the redirect Location from the untrusted Host header instead of a fixed, configured hostname.
What the attacker needed
Attacker can control the Host header
The fix
Block the abusive host and similar impactful hosts, and use a strict WAF.
How it was found
- Send a request to the sign-in path with the normal Host header and note the response.
- Repeat the request but change the Host header to a different domain.
- Observe the 301 response redirecting to that domain.
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.
A web server uses the Host header to know which site name the browser asked for. Here the server trusted whatever name was sent and used it to build a redirect, so a modified name made the site send visitors to a different website. That is called host header injection.
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.