Skip to content
XSS Write-up Beginner

Advanced XSS Bug Bounty-Full Guide: Multi-Vector Payloads That Earned Me $1500

The article describes reflected cross-site scripting in search and feedback parameters where input was reflected unsanitised in HTML, attribute and JavaScript contexts. The author bypassed a pattern-based WAF using HTML entity encoding and eventually achieved execution, claiming a bounty.

zoningxtr Follow

Published on medium.com

Are you tired of running <script>alert(1)</script> and finding nothing? 😩 You’re not alone. Most bug bounty programs block the obvious payloads, leaving many hunters frustrated.

Zoningxtr, 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

Root cause

Likely the application reflected user input into HTML, attribute and JavaScript contexts without context-appropriate output encoding, and relied on a pattern-based WAF rather than proper escaping.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser via a crafted link, though the text only demonstrates alert boxes and does not show theft of data or sessions.

What the attacker needed

Victim clicks a crafted link; reflected input on a public endpoint; WAF present but pattern-based

The fix

The application should apply context-appropriate output encoding for HTML, attribute and JavaScript contexts, sanitise event-handler attributes and use a strict Content Security Policy; the text does not state that a fix was deployed.

How it was found

  1. Submit a harmless marker string in the search parameter and search the response for it.
  2. Observe that the marker is reflected unsanitised inside a div element.
  3. Try a script tag payload and see that angle brackets are escaped.
  4. Find that input also lands inside an input value attribute and try an attribute-breaking payload.
  5. Find that input lands inside an inline JavaScript string and try a string-breaking payload.
  6. On the feedback endpoint, confirm a WAF blocks raw payloads, then send HTML-entity-encoded payloads that the browser decodes.

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.

Cross-site scripting (XSS) happens when a website puts user input into a page without making it safe, so a malicious link can run code in a victim's browser. Here the search and feedback boxes echoed the input back, and the author found ways to make the browser treat it as code. A web application firewall (WAF) is a filter that tries to block such attacks, but it can be fooled by encoded characters.

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 zoningxtr

View all

7 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.