Skip to content
Open redirect Write-up Beginner

Open Redirect to XSS: Chaining Vulnerabilities for Maximum Impact

An endpoint used to verify user accounts accepted a targetpage parameter without validation, allowing redirection to any external site. The author then hosted a JavaScript payload on their own server and redirected users to it, claiming this proved reflected XSS.

medium.com

Published on medium.com

While poking around a target application, I noticed an endpoint that looked suspiciously vulnerable. It was used to verify user accounts and had a parameter named targetpage.

iPsalmy, 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 targetpage parameter was used directly in a redirect without checking that the destination was on the same site.

Impact

A user could be sent to an attacker-controlled site, but the text does not show script execution in the original site's context, so this is not a true XSS.

What the attacker needed

Victim clicks a crafted link

The fix

The targetpage parameter should be validated to allow only same-site destinations.

How it was found

  1. Find an account verification endpoint with a targetpage parameter.
  2. Change the parameter to an external site and confirm the redirect happens.
  3. Host a JavaScript page on your own server and redirect to it.

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 is when a website lets you choose where it sends a visitor next, even to another site. The author says they then sent people to a page they controlled that ran JavaScript, which they call cross-site scripting, but that is really just a redirect to a malicious site, not a script running inside the original site.

What is Open redirect?

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.