Skip to content
XSS Write-up Beginner

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.

Taher Follow

Published on medium.com

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.

Taher, on medium.com

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

  1. Found an enquiry form that sends messages to the admin.
  2. Submitted an HTML tag to see if it rendered in the admin preview.
  3. Observed that HTML tags rendered while JavaScript was filtered.
  4. Created a tracking image link with IPLogger.
  5. Submitted an image tag pointing to the tracking link, using a protocol-relative URL to bypass link restrictions.
  6. 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.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.