From HTML Injection to Admin Info Leak — My First Bug Bount
The enquiry form allowed stored HTML injection because it filtered JavaScript but not HTML tags, so an attacker could submit an image tag pointing to an external tracking service. When an admin viewed the message, their browser loaded the image, leaking the admin's IP address and browser details to the attacker.
So I was just casually bug hunting, using Google dorks to find sites I could test. After going through a few, I landed on one.
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
Impact
The attacker could leak the admin's IP address and browser details, and potentially use the HTML injection for further exploitation.
What the attacker needed
Victim (admin) views the message; attacker can submit form
How it was found
- Found an enquiry form that sends messages to the admin.
- Submitted an HTML tag to see if it rendered in the admin preview.
- Observed that HTML tags rendered while JavaScript was filtered.
- Created a tracking image link with IPLogger.
- Submitted an image tag pointing to the tracking link, using a protocol-relative URL to bypass link restrictions.
- Waited and received a hit on IPLogger showing the admin's IP address and browser details.
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.
HTML injection is when a website lets you insert your own HTML code into a page that other people see. Here, the form blocked JavaScript but not HTML, so the attacker could add an image that secretly loaded from a server they controlled. When the admin opened the message, their browser fetched that image, revealing their IP address and browser details to the attacker.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.