How I Found 5 Reflected XSS in a Public Program
A reflected cross-site scripting vulnerability existed in the 'page' parameter on the main domain and five regional subdomains. An attacker could inject a crafted SVG payload to execute arbitrary JavaScript in a victim's browser.
medium.com
Published on medium.com
First thing before we diving in this writeup lets put a name to our target => example.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 the 'page' parameter into the HTML response without proper output encoding or sanitisation.
What the attacker needed
Victim clicks a crafted link
The fix
The vulnerability was fixed after the report was accepted.
How it was found
- Enumerate subdomains of the target using a reconnaissance tool.
- Filter live subdomains and crawl endpoints to collect URLs.
- Explore the main domain to understand its functionality.
- Identify the 'page' parameter in the endpoints list.
- Inject a custom XSS payload into the 'page' parameter and observe execution.
- Check regional subdomains for the same parameter and confirm the vulnerability on five of them.
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 a flaw where a website inserts user input into its pages without cleaning it, so an attacker can make the site run their own JavaScript. Here, the 'page' parameter was reflected back into the page, allowing a script to run when a victim visited a specially crafted link.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.