Skip to content
XSS Write-up Beginner

How I Made $1,200 by Finding a Hidden XSS in a “Secure” Web A

A URL parameter reflected into an anchor's href attribute was not sanitised, allowing an attacker to inject an event handler attribute. An attacker could execute JavaScript in a victim's browser when they hover over the link, potentially leading to session hijacking or account takeover.

Sukhveer Singh Follow

Published on sukhveersingh97997.medium.com

This is the exact story of how I found a real-world XSS vulnerability inside a production web app that looked completely secure.

Sukhveer Singh, on sukhveersingh97997.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

Impact

An attacker could execute JavaScript in the context of the authenticated dashboard, potentially leading to session hijacking, credential theft, phishing injection, or account takeover.

What the attacker needed

Victim hovers over the link; attacker can craft a URL with the payload

The fix

The application should properly encode or sanitise the redirect parameter before inserting it into HTML attributes, using context-aware output encoding.

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.

Cross-Site Scripting (XSS) is when a website puts user input into a page without cleaning it, so an attacker can make the page run their own JavaScript. Here, the 'redirect' value was placed inside a link's href attribute, and by breaking out of the quotes the attacker added an onmouseover handler that runs code when the mouse hovers over the link. This lets an attacker steal session cookies or perform actions as the victim.

What is XSS?

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

More by Sukhveer Singh

View all

1 more disclosed report, best first.

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.