Just a DOM-Based XSS
A login page read a URL parameter and passed its value to a redirect function without any filtering. An attacker could supply a javascript: value so that, after a successful login, the browser ran script instead of navigating to a normal page.
Published on flex0geek.blogspot.com
while searching on my target I found a subdomain with a login form and it depends on a JS code to log in and redirect the user after the a valid login.
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 redirect function used the raw value of the continue parameter as a navigation target without validating that it was a safe http or https URL.
Impact
An attacker could run script in the context of the login page after a victim logs in, which could steal session data or act as the user; the text shows only an alert proof of concept.
What the attacker needed
Victim logs in via a crafted link; attacker can send the link to the victim
How it was found
- Open the login subdomain and inspect the JavaScript that handles login.
- Follow the flow from submitCredentials to fetchJwt to redirectOnSuccess.
- Note that redirectOnSuccess reads the continue parameter via getUrlParameter into redirectParam.
- Observe that a regular expression splits the URL but does not filter the parameter value.
- Supply a javascript: value in the continue parameter and log in to see it accepted.
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.
After you log in, the page sends you to whatever address is in a 'continue' part of the link. The site never checked that address, so someone could put a script instruction there instead of a web address. When the login finished, the browser would run that script as if the site itself had written it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.