Reflected Xss On Admin Login Page
The admin login page reflected the 'win' URL parameter into the DOM without proper handling, allowing script injection. An attacker could craft a link that executes JavaScript in a victim's browser to steal cookies or session data.
Hi! I’m Aswin,security researcher and a penetration tester.Here we are discussing reflected XSS in a private bug bounty program.
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 inserted the 'win' parameter value into the HTML without escaping or sanitising it.
Impact
An attacker could access sensitive data or gain control of user accounts, and may craft a payload to extract admin credentials or steal a session.
What the attacker needed
Victim clicks a crafted link
The fix
The application should clean input, escape all output, and restructure so code loads only from well-defined destinations.
How it was found
- Navigate to the base URL of the application.
- After being forwarded to the login page, find the 'win' parameter in the URL and replace its value with a payload starting with a double quote and greater-than sign followed by script code.
- Observe the payload executing on the screen.
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.
Reflected cross-site scripting (XSS) happens when a website takes something you typed in the address bar and puts it directly on the page without cleaning it. If that input is a script, the browser runs it as if the site itself had written it. An attacker can send a link with a malicious script to a victim, and when the victim clicks it, the script runs in their browser and can read their cookies (small pieces of data that keep them logged in).
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.