Skip to content
XSS Write-up Intermediate

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.

pvnk24 Follow

Published on medium.com

Hi guys, Hope you are doing great, i am Pavan, Today i am going to share how i escalated a self XSS with CSRF.

Pavan K, on medium.com

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

  1. Find the login subdomain and open the forgot-password feature.
  2. Submit the username admin and see it reflected in the 'User admin not found' response.
  3. Try a script payload and get 'Invalid username' because of a client-side regex.
  4. Read the JavaScript to learn the input encryption algorithm.
  5. Build a CSRF page that encrypts the payload with that algorithm and submits it.
  6. 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.

More by pvnk24

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.