$1000 Bounty: How I scaled a Self-Redirect to an XSS in a web 3.0 system at Hackenproof
A redirect endpoint only allowed URLs ending in the site's own host, but by crafting a javascript: URL with double URL-encoding and a dummy parameter, the author bypassed the check and achieved XSS. An attacker could execute arbitrary JavaScript in a victim's browser if the victim clicked a crafted link.
Published on erickfernandox.medium.com
Hello everyone, in this article, I will share how I scaled from a self-redirect that redirected only to a link containing the host itself in the URL composition to a Cross-Site Scripting (XSS) attack.
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 validation only checked that the URL string ended with the expected host, and the application performed double URL-decoding, allowing a javascript: scheme to be injected and executed.
What the attacker needed
Victim clicks a crafted link
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 endpoint takes a URL and sends the user there, but it tried to only allow links to its own site. The author found a way to sneak in a 'javascript:' link, which runs code instead of navigating. When a victim clicks the link, their browser runs the attacker's JavaScript.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.