Skip to content
Misconfiguration Write-up Beginner

Cloudflare-Bypass: Origin server deserves some love too

The apex domain of a wildcard SSL certificate resolved to an IP address that was not Cloudflare's, indicating the origin server was exposed. An attacker could bypass Cloudflare's protections by connecting directly to that IP, potentially leading to cross-site scripting and account takeover.

medium.com

Published on medium.com

Late one night, something caught my eye during a routine recon sweep: the apex (root) domain of a wildcard SSL cert resolved to an IP address that wasn’t Cloudflare’s. Out of curiosity, I pinged the IP directly.

Smit Gharat, on 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 apex DNS record was set to DNS-only (grey cloud) while only the www subdomain was proxied through Cloudflare, leaving the origin IP publicly resolvable.

Impact

An attacker could bypass Cloudflare's protections by connecting directly to the origin IP, and the text shows this led to cross-site scripting and account takeover on an employee-only page.

What the attacker needed

Apex DNS set to DNS-only (grey cloud); origin IP publicly reachable; no firewall allowlist for Cloudflare IPs

The fix

The origin should be locked down to only allow Cloudflare's IPs in the firewall, or require authenticated origins such as mTLS/origin certificates.

How it was found

  1. Resolve the apex and www subdomain IPs and flag domains where the apex IP looks unproxied.
  2. Use curl with --resolve to force the domain to the suspected origin IP and check for absence of Cloudflare headers.
  3. Repeat the direct connection for the www subdomain to see if it is also exposed.
  4. Connect to the origin IP while requesting the www host header to observe how the server responds to mismatched host/SNI.
  5. Optionally configure Burp Suite to map the hostname to the origin IP and reload the page to confirm direct access.

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.

Cloudflare is a service that hides a website's real server address and filters bad traffic. Here, the main domain name pointed directly to the real server instead of through Cloudflare, so anyone could find and talk to the server directly, skipping Cloudflare's protection.

What is Misconfiguration?

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

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.