Earned My First 3-Digit Bounty with a Reflected XSS: Here’s How I Did It
A checkout page reflected a query parameter into the HTML response without encoding, so a crafted link could run attacker-supplied JavaScript in a victim's browser. The author reported it through a bug bounty programme and received a three-digit payout.
Every bug bounty hunter dreams of that first big payout — and for me, that dream came true with a reflected Cross-Site Scripting (XSS) vulnerability
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
The vulnerable parameter was reflected into the HTML response without output encoding, and no Content Security Policy restricted inline script.
Impact
An attacker could run arbitrary JavaScript in a victim's browser session by getting them to open a crafted link, though the text gives no further detail on what that script could achieve.
What the attacker needed
Victim opens a crafted link; no account needed to trigger it
The fix
The parameter should be HTML-encoded on output and a Content Security Policy should restrict inline script; the text does not say whether a fix was applied.
How it was found
- Open the checkout page URL with a crafted value in one of its query parameters.
- Load the page in a browser with interception disabled.
- Observe that the injected script executes, confirming the input is reflected unencoded.
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.
A web page sometimes takes text from the address bar and puts it straight into the page it sends back. If that text is JavaScript, the browser runs it as if the site itself wrote it, which is called reflected cross-site scripting. An attacker can then send a link that runs their code in the visitor'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.