XSS Vulnerability on One of the Top 10 Universities in India
The UID parameter on a university's forgot-password page was reflected into an anchor tag without sanitisation, so a crafted value could break out of the attribute and add an event handler. An attacker could send a victim a link that runs script in the university's origin when the victim clicks the login link.
medium.com
Published on medium.com
Hi everyone, this is Syed Mushir. Today, I’m sharing how I discovered a simple yet impactful XSS vulnerability on a government-run university website.
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 UID query parameter was written into an HTML attribute without encoding, letting the value close the attribute and add an event handler.
Impact
Script could run in the university's origin when a victim clicked the login link, which the author says could cause financial loss and reputational damage, though no real data theft is shown.
What the attacker needed
Victim clicks a crafted link; victim clicks the login link on the page
How it was found
- Open the login page and submit wrong credentials.
- Click forgot password, which redirects to the ForgotPassword page with a UID parameter.
- View the source and find the UID value inside a hidden input and an anchor tag.
- Replace the UID value with a value that closes the attribute and adds an onclick handler.
- Click the login link on the page and see the alert box.
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 puts a value from the address bar straight into its HTML. Here the page copied the UID value into a link's attribute, and the author could add their own onclick code, which the browser ran when the link was clicked. That is cross-site scripting: an attacker's JavaScript runs as if it came from the university's site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.