I found Reflected XSS on another university’s website
A search page reflected user input into a URL without proper validation, allowing an attacker to inject an event handler that executed JavaScript in the victim's browser. The author demonstrated this with a crafted payload that triggered an alert.
medium.com
Published on medium.com
While browsing the web I discovered a Reflected Cross-Site Scripting (XSS) vulnerability. This vulnerability allows attackers to inject arbitrary JavaScript code into your website through input fields that are not properly processed or validated.
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 concatenated user input into a URL string without properly encoding or validating it, allowing attribute injection.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser via a crafted link, potentially stealing data or performing actions on behalf of the user.
What the attacker needed
Victim clicks a crafted link
The fix
The application should properly encode or validate user input before inserting it into URLs or HTML attributes.
How it was found
- Find a search page that reflects the search term into a URL.
- Notice that the key variable blocks HTML tags but the url variable is concatenated without validation.
- Test if making the url variable empty changes the final URL structure.
- Inject a payload that breaks out of an attribute and adds an event handler.
- Observe the alert(1) executing, confirming reflected XSS.
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 page run their own code. Here, the search term was placed into a link, and by breaking out of the link's attribute, the attacker could add a mouse-over event that runs JavaScript. This lets an attacker run code in the browser of anyone who clicks a 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.