Bypass WAF by a simple trick gained $1000 bounty
The researcher found that the origin server behind Cloudflare returned a 404 when accessed by IP, but returned the real site when the Host header was set to the target domain. This allowed bypassing the WAF and reaching the origin directly.
When I was hunting on a private program on hackerone I noticed that program useCloudflare on all subdomain .target.com, I usually going to securitytrails.com to search for origin IP of the web application
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 origin server was directly reachable and served content based on the Host header, so it did not restrict access to only Cloudflare's IPs.
Impact
An attacker could bypass the Cloudflare WAF and send requests directly to the origin server, potentially exposing it to attacks that the WAF would otherwise block.
What the attacker needed
Origin IP discoverable; ability to set custom Host header
How it was found
- Find the origin IP address of the target domain using securitytrails.com.
- Request the origin IP directly and observe a 404 Not Found response.
- Change the Host header to the target domain and observe the real site response without the Cloudflare server header.
- Configure Burp Suite to redirect requests to the origin IP to bypass the WAF.
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 WAF (web application firewall) is a filter that blocks attacks before they reach a website. The site was hidden behind Cloudflare, but the researcher found the real server's IP address and sent requests directly to it with the correct website name in the Host header, skipping the filter.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.