Content spoofing through Referel header
The 404 error page on flox.io reflected the Referer header into the page content, and this value was stored server-side for a few minutes. An attacker could inject arbitrary text into the error page seen by other visitors, potentially directing them to a malicious site.
Originally disclosed on HackerOne
- Fixed in 43 hours
- Paid in 43 hours
- Disclosed after 32 days
I found content spoofing/ text injection through referel header
Steps to reproduce: whenever you came to this page https://flox.io/404/ You'll see an error message like
404: Baaah! Nothing existed there, so now you’re here. You appear to be a traveller from a distant land.
From googling I found a link leads to https://flox.io/404/ and the link is http://files.flox.io/avrisk/about
To exploit this I create a html file
<html> <body> <form method="GET" action="http://files.flox.io/avrisk/about"> <input type="submit" name="submit" value="submit"> </form> </body> </html> Note: use IE to work with this.I hosted this locally at http://localhost/a.php But I've added some text as referer header like below
http://localhost/a.php?You're browsing privatelyFirefox won't remember any history for this window.That includes browsing history, search history, download history, web form history, cookies, and temporary internet files. However, files you download and bookmarks you make will be kept.While this computer won't have a record of your browsing history, your employer or internet service provider can still track the pages you visit.Learn More.
Now the page https://flox.io/404/ shows
404: Baaah! Nothing existed there, so now you’re here. We think you may have came from: http://localhost/a.php?You'rebrowsingprivatelyFirefoxwon'trememberanyhistoryforthiswindow.Thatincludesbrowsinghistory,searchhistory,downloadhistory,webformhistory,cookies,andtemporaryinternetfiles.However,filesyoudownloadandbookmarksyoumakewillbekept.Whilethiscomputerwon'thavearecordofyourbrowsinghistory,youremployerorinternetserviceprovidercanstilltrackthepagesyouvisit.LearnMore.
Here the problem is the referer header is stored on the server side. Whoever came to this https://flox.io/404/ page will get the same result. And it stays only for few minutes. Even though the attacker can make use of this and can insert some fake content to lead users to his site.
suppose he can put his public url in the error and can also put some message to go to that site
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 stored the unsanitised Referer header value and rendered it on the 404 page without proper encoding or validation.
Impact
An attacker could inject fake content into the error page that other users see, potentially leading them to a malicious site, though the effect lasts only a few minutes and the report notes it worked in Internet Explorer.
What the attacker needed
Victim visits the crafted link or page; attacker can set a custom Referer header; Internet Explorer required per the report
How it was found
- Visit the 404 page at flox.io/404/ to see the normal error message.
- Create an HTML form that submits a GET request to a specific URL on files.flox.io.
- Host the form locally and open it in Internet Explorer.
- Add crafted text as the Referer header value in the request.
- Submit the form so the request reaches the 404 page with the injected Referer.
- Observe that the 404 page now displays the injected text, and other visitors see the same content for a few minutes.
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 often sends a 'Referer' header that tells the site where you came from. This site took that header value and displayed it on its 404 error page, and also saved it for a short time so other visitors would see the same text. An attacker could craft a link with a fake Referer value containing misleading text, and anyone visiting the error page would see that injected message.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.