My Story With XSS
The signup request included an afteractivationurl parameter that was reflected into a redirection page after URL decoding, allowing an attacker to inject an image tag with an onerror handler. When the victim clicked the activation link, the script executed and could read cookies because they lacked the HttpOnly flag.
Published on medium.com
Before starting this write up i just want to mention i started my bug bounty journey 2 months ago and they were full of adventures (btw i mean N/A and informatives and dupes ), anyways i learned bunch of stuff, one of my them is that one (it was a dupe too)
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
Impact
An attacker could execute arbitrary JavaScript in the context of the victim's session and steal their cookies, potentially leading to account takeover, because the cookies lacked the HttpOnly flag.
What the attacker needed
Victim clicks the activation link; attacker can set afteractivationurl
How it was found
- Create an account and observe the signup request to /v3/users, noting the afteractivationurl parameter.
- Follow the normal activation flow to see that the activation redirect page renders the path into HTML after URL decoding.
- Create a new account and replace the afteractivationurl value with a URL-encoded payload containing an image tag with an onerror handler.
- Open the activation email and click the malicious link.
- Observe the JavaScript execution and cookie theft.
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.
When you sign up, the site sends a link to your email to activate your account. The researcher found that the site put part of that link directly into a web page without cleaning it, so they could sneak in a small script. That script ran in the victim's browser and could read their cookies, which are small pieces of data that keep you logged in.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.