Skip to content
XSS Write-up Beginner

How Did I Get My First Collaboration Bounty Of $1000?

The main domain reflected user input in a search parameter without proper sanitisation, allowing HTML injection and then reflected cross-site scripting. An attacker could run script in a victim's browser and read their cookies, potentially leading to account takeover.

cybersecuritywriteups.com

Published on cybersecuritywriteups.com

I’m Guru Prasad Pattanaik, aka TH3N00BH4CK3R.Before we start I want to give you the context behind my story.I come from a completely non-tech background(I have done a BSc in Physics but I really love technology).I just wanted to say that I started Bug Hunting recently like 6 months ago. I’m writing my first article so…

Guru Prasad Pattanaik, on cybersecuritywriteups.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

Root cause

Likely the search parameter was reflected into the page without proper output encoding or sanitisation.

Impact

An attacker could execute script in a victim's browser and read their cookies, which could lead to account takeover, though the tester could not complete the takeover by editing cookies.

What the attacker needed

Victim clicks a crafted link; attacker can host a payload; none for the attacker

How it was found

  1. Visit the main domain instead of the in-scope sandbox domain.
  2. Test input fields with an HTML injection payload and observe reflection.
  3. Check the page source to see the reflection lacks proper sanitisation.
  4. Modify the payload to achieve HTML injection.
  5. Try an XSS payload, then use a polyglot payload from xss.report to get script execution.
  6. Craft a search query link and open it in a different browser to fire the reflected XSS and fetch the victim's cookies.

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 put whatever you typed into the search box straight back onto the page without cleaning it first. That let the tester insert HTML and then JavaScript, so the site would run code from the tester inside someone else's browser. This is called cross-site scripting, and it can let an attacker read things like login cookies.

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.