Skip to content
XSS Write-up Beginner

A Tale of Open Redirection to Stored XSS

The login page had an open redirect that could be escalated to reflected XSS, and a public profile's social media link field allowed a stored URL that redirected to a JavaScript payload, enabling stored XSS. An attacker could steal cookies from both authenticated and unauthenticated users.

Tushar Sharma Follow

Published on medium.com

During hunting on a Private BB program(which I found through these dorks: https://github.com/tushar-arch/Bug-Bounty-Dorks). I came up with the main login page where I found out Open Redirection using the

Tushar Sharma, 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

What the attacker needed

A public profile; victim clicks a crafted link

The fix

The report was accepted and the team is working on a fix; the fix should validate redirect and profile link URLs to allow only http/https schemes and trusted hosts.

How it was found

  1. Visit the main login page and use a crafted URL to trigger an open redirect.
  2. Escalate the redirect to reflected XSS by using a javascript: payload.
  3. On a public profile, add a social media handle link containing a javascript: payload.
  4. Click the saved social media link on the profile to trigger stored XSS.

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.

An open redirect lets a site send you to any other site by changing a link parameter. Here, the redirect could also run JavaScript, and a saved profile link did the same, so visiting a crafted link could run code in the victim's browser and steal their session.

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 Tushar Sharma

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.