Skip to content
XSS Write-up Intermediate

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.

0xdln Follow

Published on web.archive.org

Reflected-XSS

0xdln, on web.archive.org

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

  1. Test parameters for XSS and observe that common event handlers are blocked by the WAF.
  2. Try all event handlers from a cheat sheet and find that only touchstart, touchmove, touchcancel, and touchend return 200 OK.
  3. Inject a payload using a touch event handler in the name parameter.
  4. Simulate a mobile device using Chrome DevTools' Toggle Device Toolbar.
  5. 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.

More by 0xdln

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.