Bypass Waf Cloudflare Rxss Hackerone
A search parameter on several brand sites reflected user input into the page, allowing HTML injection and then reflected cross-site scripting. The author bypassed a Cloudflare WAF by changing the payload to upper-case letters, and could run script in a victim's browser to read cookies.
Published on infosecwriteups.com
i Found 6 RXSS with same company bcz they’re using same vendor i think and maybe the source code it’s also same . I identify the vulnerability with html injection first either it’s execute or no .
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 search parameter was written into the HTML response without proper output encoding, and the WAF rule only matched lower-case tag patterns.
Impact
An attacker could send a crafted link that runs script in a victim's browser and could read that user's cookies, though the report rates severity as low.
What the attacker needed
Victim clicks a crafted link; search parameter reflects input
The fix
The issue was fixed and resolved according to the report; the proper fix is to HTML-encode user input on output rather than relying on WAF rules.
How it was found
- Go to the site's search bar.
- Enter a simple HTML heading tag and see it render, confirming HTML injection.
- Try a script payload and observe the WAF blocking it.
- Change the payload to upper-case letters so it executes and pops an alert.
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 bug means text you type into a search box is sent back in the page as if it were part of the website's own code. If that text can include HTML tags or script, the browser runs it, so an attacker can make a link that runs their code in someone else's session. Here a firewall tried to block the attack, but simply changing the letter case of the tags got past it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.