Skip to content
XSS Write-up Intermediate

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.

Prasad KB, 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 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

  1. Find the 'Help Me' page option in the configuration tab.
  2. Enter a javascript: payload in the URL field; it is rejected by client-side validation.
  3. Capture the link and input a malicious XSS payload.
  4. The payload is accepted because validation is only client-side.
  5. Visit the 'Help Me' page; the payload does not trigger because the link has target=_blank.
  6. 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.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.