How I Found My First Bug | XSS
A reflected cross-site scripting vulnerability was found in a URL parameter of a website. An attacker could inject a script that executes in a victim's browser when they visit a crafted link.
Today I’m going to talk about how I found my first bug on a website and I hope this article can help others to find their first bug too.
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 website reflected user input from a URL parameter into the HTML response without proper encoding or sanitisation.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser, potentially stealing cookies or performing actions on their behalf, though the text does not detail specific consequences.
What the attacker needed
Victim clicks a crafted link
How it was found
- Search Google for pages with a vulnerable-looking parameter using a dork.
- Pick a website from the results and open it.
- Send the request to Burp Intruder and mark the parameter position.
- Load a list of XSS payloads and run the attack.
- Review responses and identify a payload that closes the form tag and injects an SVG onload handler.
- View the response in a browser to confirm the script executes.
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 site run their own JavaScript. Here, the author found a parameter in the URL that reflected a script back to the browser, which then executed.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.