They Said XSS Was Dead… Then I Got Paid (My First Bounty in 20
A login page reflected a Base64-encoded redirect parameter without proper encoding, allowing an attacker to inject an attribute that triggers JavaScript when a keyboard shortcut is pressed. The author used an accesskey and onclick payload to bypass a WAF that stripped angle brackets, achieving reflected XSS in Firefox.
I’m a beginner bug bounty hunter and an Electrical & Electronic Engineering student ⚡🔌.
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 reflected the 'return' parameter into an HTML attribute without proper output encoding, allowing attribute injection.
Impact
An attacker could execute arbitrary JavaScript in the context of the victim's session if the victim uses Firefox and presses a specific keyboard shortcut, potentially leading to account compromise or data theft.
What the attacker needed
Victim uses Firefox; victim presses Alt+Shift+X; attacker can craft a URL
The fix
The application should properly encode the 'return' parameter before reflecting it into HTML attributes, and the WAF should be configured to block attribute-based XSS payloads.
How it was found
- Open the login page and inspect the page source to find hidden input fields.
- Change the 'return' parameter value and observe that it is reflected in the page.
- Inject a double quote to break out of the attribute and confirm reflection.
- Try an image tag with an onerror handler, but note the WAF strips content between angle brackets.
- Use an accesskey and onclick payload to bypass the WAF.
- In Firefox, press Alt+Shift+X to trigger the alert.
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 shows user input without cleaning it, so an attacker can make the site run their own JavaScript. Here, the login page put a value from the URL into the page, and by breaking out of an HTML attribute the author could add a keyboard shortcut that runs code when pressed. This only worked in Firefox and required the victim to press a specific key combination.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.