Stealing credentials using XSS (xss on login page) Your password my password .
A login page reflected a URL parameter into a return link, allowing script injection. An attacker could inject JavaScript that reads the username and password fields on submit and sends them to an attacker-controlled server, harvesting credentials.
Published on medium.com
Just a curious experiment , if a xss exists on a login page we can harvest credentials of users or specific data . (example of possible threat here…).
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 returnURL parameter was reflected into the page without output encoding, allowing script injection.
Impact
An attacker could harvest users' login credentials, though a Content Security Policy or browser differences may limit whether the injected script runs.
What the attacker needed
XSS on the login page; victim visits crafted link; victim submits the login form
How it was found
- Find a login page that reflects a URL parameter into a return link.
- Inject a script through that parameter.
- The script listens for the login form submit and reads the username and password.
- The script sends the stolen values to an attacker server, which stores them with the IP address.
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 login page took a value from the web address and put it back into the page without cleaning it. Because of that, an attacker could make the page run their own code, which quietly copied what a user typed into the login form and sent it to the attacker. This is called cross-site scripting, or XSS.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.