Open Redirect to Xss
A redirect endpoint accepted a user-supplied URL and sent the browser to it, allowing an open redirect. The author then bypassed a firewall filter to make the redirect use a javascript: URL, turning it into reflected cross-site scripting.
Hello, I’m 0xkarim from Morocco, passionate about cybersecurity, particularly in discovering vulnerabilities in websites and applications. I enjoy analyzing systems, identifying weaknesses, and working on improving their security.
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 redirect parameter was used without validating that the destination was a safe http(s) URL, and the firewall filter was bypassed with encoded characters.
Impact
A crafted link could run script in a victim's browser in the context of the target site, though a firewall had to be bypassed first.
What the attacker needed
Victim clicks a crafted link; firewall bypass needed
How it was found
- Search the Wayback Machine for archived URLs on the target domain
- Look for parameters containing a URL value
- Find a redirect endpoint that accepts a destination URL
- Try a javascript: URL in the parameter and observe the firewall blocking it
- Encode characters in the payload to evade the filter
- Load the crafted URL and see the alert pop-up
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 redirect page is meant to send you to another site, but here it trusted any address the visitor supplied. Because the browser also accepts a 'javascript:' address that runs code, the author found a way to sneak that past a filter, so a crafted link could run script in the victim's browser on the real site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.