From a “Self-XSS” to a Convincing UI Spoof: A Bug Bounty Stor
A search box reflected an XSS payload when typed directly, but the same payload in the URL parameter returned a 404, so it was initially classed as self-XSS. A partner built a proof-of-concept that replaced the page with a convincing fake login interface, but the victim had to type something into the search box first, and the report was closed as a duplicate.
There’s a special kind of pain in bug bounty. Not getting an Out of Scope.
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 search page rendered user input as HTML without proper sanitisation, but only after a search interaction, so the payload in the URL alone did not trigger it.
Impact
An attacker could show a convincing fake login interface after the victim typed into the search box, but the crafted URL alone did not display it, so user interaction was required.
What the attacker needed
Victim types into the search box
How it was found
- Enter a simple XSS payload into the search field and observe an alert box.
- Copy the same payload into the URL parameter and load the page, which returns a 404.
- Try other payloads, URL encoding, different tags and events, all returning 404.
- Build a proof-of-concept that replaces the rendered HTML with a fake login interface.
- Open the crafted URL and type anything into the search box to trigger the spoofed page.
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 self-XSS is a script injection that only runs when you type the malicious code into your own browser, so it normally cannot be used to attack someone else. Here the team showed that after the victim types anything into the search box, the page can be replaced with a fake login screen, which could trick someone into entering their password.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.