HTML Injection(Unique Exploitation)
The application reflected the X-Forwarded-For header value into the login email without sanitisation, allowing an attacker to inject HTML. An attacker could send a crafted header so the victim's email contained a phishing link styled as a login prompt.
Published on medium.com
Hey Guys! I know HTML injection is not something you wanted to read but however its an unique issue which i have found.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application trusted the client-supplied X-Forwarded-For header and inserted it into the email HTML without encoding.
Impact
An attacker could make the login email contain a link to an attacker-controlled site, which could be used for phishing; the report does not show any other impact.
What the attacker needed
Ability to set the X-Forwarded-For header; victim receives the login email
The fix
The issue was fixed by the CEO within two minutes, according to the report.
How it was found
- Submit the login request that sends the magic link email.
- Add an X-Forwarded-For header with a test value and observe it reflected in the email.
- Replace the header value with HTML markup and confirm it renders in the email.
- Replace the header value with an anchor tag linking to an attacker-controlled site and confirm the link appears.
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 write-up has not been written yet. The Original tab links to the source.
When you log in, the site sends you an email with a login link and shows your IP address in that email. The site took the IP address from a header that the user can set, and put it into the email without cleaning it. That let the attacker put their own HTML, such as a fake login link, into the email.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.