How I Earned $350 Exploiting Clickjacking Vulnerability to Trigger XSS Attack
A chat bot rendered user-supplied HTML, allowing self-XSS. The researcher chained this with clickjacking to trick victims into pasting and submitting a malicious payload, which executed on the main site and could steal cookies.
Published on medium.com
FREE LINK
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 chat bot failed to sanitise user input before rendering it as HTML, and the main page lacked clickjacking protection, allowing the two issues to be chained.
Impact
An attacker could trick a user into executing arbitrary JavaScript on the main site, potentially stealing cookies and sensitive information.
What the attacker needed
Victim interacts with a malicious page; victim pastes copied payload; victim clicks Claim
The fix
The main site added clickjacking protection, and the third-party chat bot was also fixed after coordination.
How it was found
- Open the chat bot and perform basic actions to activate the text panel.
- Enter a basic HTML payload to see if it is rendered as HTML.
- Enter an XSS payload using an image tag and submit it; it executes on the main site.
- Create a clickjacking page that overlays the main site and includes a button to copy the XSS payload.
- Trick the victim into clicking the copy button, then pasting the payload into the voucher claim field and clicking Claim.
- The payload executes on the main site and the attacker receives the victim's cookies.
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.
Clickjacking tricks you into clicking something you didn't intend to, often by hiding a button under a harmless-looking element. Self-XSS is when you paste malicious code into a site yourself, which normally only affects you. Here, the attacker used clickjacking to make victims paste and submit the code, turning self-XSS into an attack that could steal their cookies.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.