XSS-Special-Cases: XSS That Works only in mobile Devices
A banking website's WAF blocked common XSS event handlers but allowed mobile-specific touch event handlers. An attacker could inject a payload using these handlers to execute JavaScript when a victim interacts with the page on a mobile device.
Reflected-XSS
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 arbitrary JavaScript in a victim's browser when the victim interacts with the page on a mobile device, potentially stealing cookies.
What the attacker needed
Victim uses a mobile device; victim clicks or interacts with the page
How it was found
- Test parameters for XSS and observe that common event handlers are blocked by the WAF.
- Try all event handlers from a cheat sheet and find that only touchstart, touchmove, touchcancel, and touchend return 200 OK.
- Inject a payload using a touch event handler in the name parameter.
- Simulate a mobile device using Chrome DevTools' Toggle Device Toolbar.
- Click on the name field to trigger the alert with 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.
Cross-site scripting (XSS) lets an attacker run their own JavaScript in a victim's browser. Here, the site's security filter blocked most ways to trigger script, but forgot touch events used on phones. So the attack only worked when the page was viewed on a mobile device.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.