How i got xss in unusual way
Parameters on the target site were reflected without filtering, and one reflection landed inside an href attribute, allowing an attacker to inject an onclick handler. Because the injected link was not visible, the author added an accesskey attribute and a lure sentence so a victim pressing the keyboard shortcut would trigger the script.
Assalamualaikum, guys! let me introduce myself. My name is Omar Elqady, also known as Barbarossa
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 user-controlled parameter values into an HTML attribute context without encoding or validation.
Impact
An attacker could run script in a victim's browser if the victim visits a crafted link and presses the keyboard shortcut, though the injected element is not visible and requires that interaction.
What the attacker needed
Victim visits a crafted URL; victim presses a keyboard shortcut
How it was found
- Collect URLs with parameters for the target using crawling and archive tools and save them to a file.
- Run the collected URLs through a reflection-checking tool to look for unfiltered characters.
- Inject a test value and observe that it lands inside an href attribute in the page source.
- Add an event handler and an accesskey attribute to the injected value.
- Press the keyboard shortcut to confirm the script runs.
- Add a lure sentence so a victim is encouraged to press the shortcut.
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 text from the address bar into its page without cleaning it, so an attacker can slip in code that the browser runs. Here the text went inside a link attribute, so the author added an event handler that runs when the element is activated. A keyboard shortcut (accesskey) was used to make the hidden element triggerable.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.