Skip to content
Misconfiguration Write-up Beginner

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.

0xBartita Follow

Published on 0xbartita.medium.com

Bounty$1,000 View original

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

0xBartita, on 0xbartita.medium.com

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

  1. Find the origin IP address of the target domain using securitytrails.com.
  2. Request the origin IP directly and observe a 404 Not Found response.
  3. Change the Host header to the target domain and observe the real site response without the Cloudflare server header.
  4. 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.

More by 0xBartita

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.