My First Reflected XSS: A Beginner’s Journey in Bug Bounty Hunt
A nickname input field reflected user input without escaping, allowing a script tag to execute in the browser. An attacker could run arbitrary JavaScript in a victim's session by getting them to submit or view the crafted nickname.
As someone who’s recently stepped into the exciting world of bug bounty hunting, I always imagined my first bug would be a huge deal. Spoiler alert: it wasn’t about the bounty — it was about the experience and learning.
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 nickname field reflected user input into the page without output encoding or sanitisation, unlike the search bar which escaped characters.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser through the reflected nickname, though the text does not describe any specific harm beyond the alert box.
What the attacker needed
A user account with a nickname field; victim views the reflected nickname
How it was found
- Test the search bar with a basic script payload and observe that characters are escaped or sanitised.
- Move to the account/profile section and find the nickname input field.
- Submit the same basic script payload in the nickname field.
- Navigate to where the nickname is reflected and see the script execute.
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 reflected cross-site scripting (XSS) bug happens when a website takes something you type and shows it back on a page without making it safe. If the text includes code, the browser runs it as if the site itself had written it. Here, the search bar cleaned up the input, but the nickname field did not.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.