$500 Bypassing Cloudflare WAF to Achieve XSS
The report claims that a Cloudflare WAF blocked common XSS payloads containing alert(1), but a crafted anchor tag with a confirm(1) handler bypassed the filter and executed as XSS. The author states the payload executed on the website, but provides no technical detail on the vulnerable input or the exact execution context.
Published on medium.com
I’mAbhijeet Kumawat, a passionate security researcher 🕵️♂️, and today, I’m thrilled to share an exciting vulnerability I uncovered — a successful bypass of Cloudflare’s WAF (Web Application Firewall), leading to the discovery of an XSS (Cross-Site Scripting) vulnerability! 🎯
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 reflected user input into a page without proper output encoding, and the WAF's pattern-based filter was incomplete.
What the attacker needed
Target uses Cloudflare WAF; vulnerable input field reflects input
The fix
The application should encode output and validate input server-side rather than relying solely on a WAF; the text does not state that a fix was applied.
How it was found
- Identify that the target uses Cloudflare WAF.
- Test standard XSS payloads and observe they are blocked.
- Analyse WAF filtering logic and note that some obfuscated patterns bypass it.
- Craft a custom payload using an anchor tag and confirm(1) instead of alert(1).
- Inject the payload into a vulnerable input field and submit it.
- Observe the payload execute, confirming XSS.
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 inspects incoming requests and blocks ones that look malicious, such as scripts that pop up alert boxes. Here, the filter blocked the usual test scripts but missed a different way of writing a link that still ran JavaScript. The author says this let them run their own script in the page, which is cross-site scripting (XSS).
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.