This is how i escalated self XSS with CSRF
A password-reset form reflected the submitted username in its response, but a client-side regex and input encryption blocked direct payloads. The researcher built a cross-site request forgery page that encrypted an XSS payload with the site's own algorithm, so a victim who clicked it would trigger the script on the target domain.
Hi guys, Hope you are doing great, i am Pavan, Today i am going to share how i escalated a self XSS with CSRF.
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 username validation and encryption were only enforced client-side, so the server accepted and reflected any encrypted value without re-checking it.
Impact
A victim who clicked the crafted page could have script run in their browser on the target site, though the report does not show what that script could then do.
What the attacker needed
Victim clicks an attacker link; no account needed
How it was found
- Find the login subdomain and open the forgot-password feature.
- Submit the username admin and see it reflected in the 'User admin not found' response.
- Try a script payload and get 'Invalid username' because of a client-side regex.
- Read the JavaScript to learn the input encryption algorithm.
- Build a CSRF page that encrypts the payload with that algorithm and submits it.
- A victim who clicks the page is redirected and the script runs.
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 reflected cross-site scripting (XSS) bug lets an attacker make a website echo back code that a victim's browser then runs. Here the site checked the username only in the browser, so the attacker made a separate page that did the encryption properly and submitted the malicious value for the victim, which is cross-site request forgery (CSRF).
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.