Skip to content
XSS Write-up Intermediate

The WAF Gambit: How I Bypassed a Client’s Web Application Firew

A penetration tester found that a client's web application was vulnerable to cross-site scripting because a WAF failed to block a payload using a hidden input element and a newer CSS visibility event. The tester could execute JavaScript in the browser, bypassing the WAF's protection.

GhostWield Follow

Published on medium.com

Hey fellow hackers! 👨‍💻👩‍💻 Grab your coffee because I’ve got a crazy story for you. It’s about how a simple payload I stumbled upon while scrolling through LinkedIn led to bypassing a Web Application Firewall (WAF) during a pentest, and — surprise — it exposed a vulnerability the client didn’t see coming.

GhostWield, on 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 application inserted user input into the page without proper encoding, and the WAF's rules did not recognise the newer event handler and CSS property used in the payload.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser, potentially stealing data or performing actions on their behalf, though the text does not detail specific consequences.

What the attacker needed

Victim visits a crafted page or link; browser supports the event (Chromium-based)

The fix

The application code should be fixed to properly encode or sanitise user input, rather than relying solely on the WAF.

How it was found

  1. The tester crafted a payload using a hidden input element with an event handler and a CSS visibility property.
  2. The tester submitted the payload to the application.
  3. The payload bypassed the WAF and an alert box appeared, confirming script execution.

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 web application firewall (WAF) is a filter that tries to block malicious input before it reaches a website. Here, the tester used a trick that the filter did not recognise, so a script ran in the browser. This shows that a WAF alone cannot stop all attacks; the website's own code must also be safe.

What is XSS?

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

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.