Skip to content
XSS Write-up Intermediate

Reflected XSS on Target with tough WAF ( WAF Bypass )

A forgotten test page reflected the charset parameter without sanitisation, allowing script execution. A tough WAF blocked common payloads, but the hunter found a tag and event combination that slipped through and executed in Chrome.

Eagle_92 Follow

Published on jowin922.medium.com

I was doing web pentest on a private program. The program had a very tough WAF even typing alert as a payload would be blocked by WAF.

jowin922, on jowin922.medium.com

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 test page reflected the charset parameter into the HTML response without encoding it, and the WAF's blocklist did not cover the chosen tag and event.

Impact

An attacker could run script in a victim's browser via a crafted link, though the payload only worked in Chrome.

What the attacker needed

Victim clicks a crafted link; Chrome browser; leftover test page reachable

How it was found

  1. Find the leftover test endpoint by directory bruteforcing.
  2. Send tag names from a cheat sheet in the charset parameter and note which are not blocked.
  3. Send event names from the cheat sheet and note which are not blocked.
  4. Combine an allowed tag and event to build a payload that executes.

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 reflected cross-site scripting (XSS) bug means a value you put in a link is echoed back into the page as code, so the browser runs it. Here a leftover test page did this, and although a web application firewall (WAF, a filter that inspects requests) blocked most attempts, one unusual tag and event pair got through.

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 Eagle_92

View all

1 more disclosed report, 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.