Skip to content
XSS Write-up Intermediate

Vulnerability Chain: Unexploitable Self-XSS + CSRF + Open Redirec

A self-XSS in the email verification page's nextUrl parameter could only be triggered by the same user, but the author chained it with a login CSRF and open redirect on a 2FA one-click login link to force a victim to log in as the attacker and then execute the XSS in the victim's browser.

Abdo Rabea Follow

Published on meetcyber.net

I started my testing with login/signup as usual. After signing up, I was redirected to the email verification page.

Abdo Rabea (0xOverlord), on meetcyber.net

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 verification page reflected the nextUrl parameter into an anchor tag without proper output encoding, and the 2FA login link accepted an arbitrary redirectUrl, allowing the two issues to be chained.

Impact

An attacker could force a victim to log in as the attacker and then execute arbitrary JavaScript in the victim's browser, potentially leading to account takeover or data theft, though the report only demonstrated an iframe injection.

What the attacker needed

Victim clicks a crafted one-click login link; attacker has an account on the target

How it was found

  1. Sign up for a new account and reach the email verification page.
  2. Intercept the email verification request and note the nextUrl parameter.
  3. Modify nextUrl with an XSS payload and complete verification by opening the emailed link.
  4. Observe that opening the verification link in a different session does not trigger the payload because the backend checks that the session email matches the verification link.
  5. Begin a login/2FA flow that sends a one-click login link, intercept the request, and replace the redirectUrl with the self-XSS verification link.
  6. Send the one-click login link to the victim; the victim is logged in as the attacker, redirected to the self-XSS page, and the payload executes.

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 cross-site scripting flaw that only affects the person who enters the malicious input, so it is normally useless to an attacker. Here the attacker first tricks the victim into logging in as the attacker's account (login CSRF), then uses an open redirect to send the victim to the page containing the stored script, so the script runs in the victim's browser.

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 Abdo Rabea

View all

1 more disclosed report, 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.