Skip to content
XSS Write-up Intermediate

New trick to make self xss impactful

The text describes a technique to turn a self-XSS into a more impactful attack by opening a window with the victim's sensitive data, then forcing the victim to log into the attacker's account via CSRF, where a stored XSS executes and reads the sensitive window's DOM due to same-origin policy. The attacker can then exfiltrate the victim's data and log the victim out of the attacker's account.

Rahulkrishnan_R_Panicker Follow

Published on medium.com

Self xss is considered as a non qualifying vulnerability for most of the bug bounty programs but with this clever trick found by Matan berson will change it

Rahulkrishnan R Panicker, 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 application allows stored XSS in user-controlled fields and lacks CSRF protection on login, combined with the browser's same-origin policy not distinguishing between user accounts.

Impact

An attacker could steal sensitive information such as API keys or PII from a victim's authenticated session, provided the victim is tricked into logging into the attacker's account and the stored XSS executes.

What the attacker needed

Victim clicks a link or visits attacker page; stored XSS in attacker's account; login endpoint lacks CSRF protection; victim logged into target site

The fix

The application should prevent stored XSS by sanitising user input and should add CSRF protection to the login endpoint.

How it was found

  1. Open a window with the victim's sensitive information using window.open.
  2. Force the victim to log into the attacker's account via a crafted login request.
  3. Trigger the stored XSS in the attacker's account, which reads the sensitive window's DOM.
  4. Exfiltrate the stolen data to an attacker-controlled server.
  5. Log the victim out of the attacker's account to reduce suspicion.

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.

Self-XSS is a bug where a script only runs in your own browser, so it seems useless. This trick makes it useful: the attacker first opens a page showing the victim's private data, then tricks the victim into logging into the attacker's account where a stored script runs. Because both pages are on the same website, the script can read the private data from the first page and send it to the attacker.

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 Rahulkrishnan_R_Panicker

View all

5 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.