Unique XSS Earned Me a $$$ Bounty
A URL field on a 'Help Me' page accepted a javascript: payload because validation was only client-side, and the link opened in a new tab. The payload executed when the link was opened in a new tab within the same domain, such as by clicking with the mouse wheel.
medium.com
Published on medium.com
I’m excited to share my latest experience with you all. As many of you know, bug bounty hunting is both a thrilling and rewarding journey.
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 application relied on client-side validation to check that the input was a valid URL, and did not sanitise the javascript: scheme on the server.
Impact
The payload could execute in the context of the site when a user opens the crafted link in a new tab on the same domain, which could affect user privacy and security.
What the attacker needed
Ability to set a URL field on the Help Me page; victim opens the link in a new tab on the same domain
How it was found
- Find the 'Help Me' page option in the configuration tab.
- Enter a javascript: payload in the URL field; it is rejected by client-side validation.
- Capture the link and input a malicious XSS payload.
- The payload is accepted because validation is only client-side.
- Visit the 'Help Me' page; the payload does not trigger because the link has target=_blank.
- Open the link in a new tab within the same domain, for example by clicking with the mouse wheel, and the payload executes.
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 website had a box where you could type a web address. It checked the address only in the browser, not on the server, so a special address starting with 'javascript:' got through. When someone opened that link in a new tab on the same site, the code ran, which is called cross-site scripting (XSS).
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.