How I Used Cloudflare’s Health Checks to Bypass Their WAF Rules
Cloudflare's load balancer health checks could be configured to send requests to an arbitrary origin IP with an arbitrary Host header, bypassing the victim's firewall rules and Host header checks. An attacker could use this to trigger blocked endpoints and potentially perform blind attacks such as SQL injection or denial of service.
medium.com
Published on medium.com
In late 2019, I discovered an unexpected method to bypass firewall protections on a website behind Cloudflare — using Cloudflare’s own load balancer health checks. I responsibly reported the issue via their HackerOne program, and while it was ultimately marked as “informative,” it was also acknowledged and awarded a…
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
Cloudflare's load balancer health checks allowed users to specify an arbitrary origin IP and Host header without validating ownership, so requests originated from Cloudflare's trusted IP range and bypassed origin-side access controls.
Impact
The trick allowed triggering blocked endpoints, bypassing Cloudflare WAF and firewall rules, simulating blind HTTP requests, and potentially executing blind attacks such as SQL injection or denial of service, with load amplifiable by lowering check intervals.
What the attacker needed
Cloudflare account (free tier sufficient); Victim origin IP known; Victim origin accepts Cloudflare IPs; Victim uses Host header checks
The fix
Cloudflare should limit load balancers to send Host headers only for domains owned by the account, require IP ownership validation before allowing origin IPs in health checks, separate health check infrastructure from real traffic IP pools, and encourage use of Argo Tunnels or Authenticated Origin…
How it was found
- Create a Cloudflare account and add a dummy domain.
- Create a load balancer with a pool pointing to the victim's exposed origin IP.
- Configure the health check to use HTTPS, skip TLS certificate validation, check the blocked path, and inject the victim's Host header.
- Observe that Cloudflare's health checker sends requests from Cloudflare IPs with the expected Host header, bypassing the firewall rule and Host header checks.
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 website used Cloudflare as a shield, only letting Cloudflare's servers talk to its real server and blocking certain paths. The researcher found that Cloudflare's own health-check feature could be told to contact any server with any website name, so it acted like a trusted messenger that could be tricked into delivering requests the shield was supposed to block. This let the researcher reach parts of the site that were meant to be off-limits.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.