Skip to content
XSS Write-up Beginner

Five-minute hunting for hidden XSS

A GET parameter named 'e' contained a base64-encoded string that was decoded and rendered without sanitisation, allowing an attacker to inject an XSS payload. The attacker could execute arbitrary JavaScript in the victim's browser, potentially leading to account takeover.

Bartłomiej Bergier Follow

Published on bergee.it

One night I was about to go to sleep, however, set the goal of finding the bug within a max of 15 minutes. I did some google dorking like this:

bergee, on bergee.it

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 decoded the base64 parameter and inserted its contents into the page without sanitisation.

Impact

The attacker could execute arbitrary JavaScript in the victim's browser, which the author notes could be escalated to account takeover.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Find a site with an admin panel using Google dorking.
  2. Notice a GET parameter 'e' containing a base64-encoded string.
  3. Decode the string to see a pipe-separated value including '(failed)'.
  4. Replace '(failed)' with an XSS payload.
  5. Base64-encode the modified string and put it back into the URL.
  6. Visit the URL and observe the XSS executing.

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.

The website took a hidden value from the URL, decoded it, and put it directly on the page without checking it. By changing part of that value to a script, the attacker made the browser run their code. This is called cross-site scripting (XSS).

What is XSS?

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

More by Bartłomiej Bergier

View all

11 more disclosed reports, best first.

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.