Skip to content
Misconfiguration Write-up Beginner

Cloudflare Tunnel — Origin Exposure Weaponized

The article describes how misconfigured Cloudflare Tunnel setups can leave the origin server directly reachable on the internet, bypassing Cloudflare's WAF and rate limiting. An attacker who finds the origin IP through DNS history or scanning can interact with the backend directly, enabling brute force, WAF bypass, and potential full compromise.

medium.com

Published on medium.com

Cloudflare Tunnel is one of the most popular ways to expose private applications to the internet without opening firewall ports. It’s widely used for internal dashboards, APIs, and staging environments.

Hashir Sami Khan, 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

Impact

An attacker could bypass Cloudflare's WAF and rate limiting, directly attack the backend, brute force authentication, and potentially achieve remote code execution or account takeover.

What the attacker needed

Misconfigured origin firewall; ability to discover origin IP

The fix

The origin should be configured to accept traffic only from Cloudflare IP ranges, with a firewall dropping all other inbound requests.

How it was found

  1. Enumerate DNS records for the target domain and check if the IP belongs to Cloudflare.
  2. Look at historical DNS data from services like SecurityTrails to find old IPs.
  3. Test suspected origin IPs directly with curl and compare headers for Cloudflare indicators.
  4. Scan ports on the suspected origin to find exposed services.
  5. Use Shodan or Censys to search for the hostname and identify non-Cloudflare IPs.

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 Tunnel is meant to hide a website's real server so all traffic goes through Cloudflare's protective layer. If the server is still reachable directly, an attacker can skip Cloudflare entirely and attack the server without any filtering. This article explains how to check for that mistake and why it matters.

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.