How I Bagged $2,500 with a Simple XSS Using Burp Suite
A referral parameter on an e-commerce checkout page was reflected unescaped into a JavaScript variable, allowing an attacker to break out of the string and execute arbitrary script. The hunter demonstrated a reflected cross-site scripting (XSS) attack that fired an alert box.
medium.com
Published on medium.com
As a seasoned bug bounty hunter, I’ve come to learn that XSS (Cross-Site Scripting) vulnerabilities are often hiding in plain sight — especially in complex applications. In this case, I discovered a $2,500-worth reflected XSS on a high-traffic e-commerce platform using nothing but Burp Suite and solid recon tactics.
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 directly into a JavaScript string without escaping quotes or semicolons.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser when the victim visits a crafted link, potentially stealing data or performing actions on behalf of the user.
What the attacker needed
Victim clicks a crafted link
The fix
The report suggested sanitising or escaping user input and implementing a Content Security Policy (CSP).
How it was found
- Visit a live order confirmation page and spot the ref parameter.
- Send the request to Burp Repeater.
- Try injecting a script tag into the ref parameter; no alert shows.
- Notice the value is reflected inside a JavaScript variable.
- Craft a payload that breaks out of the JavaScript string and triggers an alert.
- Confirm the alert fires and create a proof-of-concept URL.
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) is when a website takes input from a user and puts it into a page without cleaning it, so an attacker can make the page run their own code. Here, the input went inside a JavaScript string, and the attacker used a quote and semicolon to break out and run code. This could let an attacker run scripts in a victim's browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.