root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat vulnerability-pattern-waf-bypass.md
// bug-bounty

WAF Bypass

23 Jul 2026 · 3 min read

What it is

A WAF (or similar filter) blocks the 'obvious' shape of a payload, but the underlying vulnerability is completely untouched — the WAF is pattern-matching on syntax, not understanding intent, so a differently-encoded or restructured payload sails straight through.

Why it matters

It turns an already-fixed-looking finding back into a live one, and it's usually the difference between a program dismissing a report as 'already mitigated' and accepting it as critical.

Where to look

  • Anywhere a payload gets a generic 403/406 block page instead of the app's normal error handling — that mismatch is the signature of a WAF sitting in front, not application logic

How I test it

  1. Confirm it's actually a WAF: does the block page differ from the app's own error pages? Does it trigger on keywords rather than on malformed syntax?
  2. Try case variation, whitespace/comment insertion, and alternate encodings — URL, double URL, Unicode, HTML entities.
  3. Try HTTP parameter pollution — repeating the same parameter name with different values.
  4. Try wrapping the payload in a format the WAF doesn't parse but the backend does — nested encoding, an unexpected Content-Type, JSON where XML was expected or vice versa.
  5. Once a variant slips through, re-confirm the original vulnerability's impact still holds with the modified payload — a bypass without impact is just a curiosity.

Hunting checklist

  • Confirmed the block is coming from a WAF, not app logic
  • Tried case/whitespace/comment variations
  • Tried at least two encoding schemes
  • Tried parameter pollution
  • Tried an alternate content wrapping/Content-Type
  • Re-confirmed the underlying vulnerability still fires with the bypass payload

Evidence to collect

  • The blocked payload and its block response
  • The bypass payload and its accepted response
  • Proof the underlying vulnerability still triggers (screenshot/response showing the actual impact, not just '200 OK')

Recommended fix

  • Fix the underlying vulnerability — a WAF rule is not a patch
  • Normalize and decode input consistently before both the WAF and the application evaluate it, so they see the same thing
  • Treat WAF rules as defense in depth, never as the only control