A challenge loop has one mechanical cause: the visitor passes (or never gets to pass) the check, but the proof does not stick, so the next request is challenged again. The proof is the cf_clearance cookie plus the attributes it was issued against. Anything that blocks the cookie, breaks the challenge script, or changes the visitor’s network identity mid-session restarts the test — which is why privacy browsers, VPNs with rotating exits, and cookie-blocking policies dominate these reports. Diagnose from Security > Events: repeated challenge issues with no solve, or solves followed immediately by fresh issues, tell you which of the two failure shapes you have.
What’s happening
In the edge’s order of evaluation — DDoS mitigation, IP Access rules, WAF custom rules, rate limiting, managed rulesets, with bot products (Bot Fight Mode on Free, Super Bot Fight Mode on Pro and Business) alongside — several different services can be the one issuing the challenge: Security Level reacting to IP reputation, a custom rule you wrote, a bot product, or Under Attack Mode challenging everyone. Whoever issues it, the flow is the same: Cloudflare serves an interstitial, JavaScript from challenges.cloudflare.com runs its checks, and success sets cf_clearance, honoured for the Challenge Passage duration (default 30 minutes).
Loops split into two shapes. Never solves: the challenge script cannot run or report — JavaScript disabled, an extension or firewall blocking challenges.cloudflare.com, a device clock far off, or a Content-Security-Policy header your own Transform Rule or Worker injects into every response, including the challenge page, breaking its script. Solves but does not stick: cookies blocked entirely (the clearance cookie is first-party, so only aggressive “block all” settings kill it), private windows that discard state, or a VPN/CGNAT that presents a different exit IP on the next request, invalidating the clearance it just earned. Shared bad-reputation IPs add a third flavour: every fresh session starts with a challenge, which users experience as “constantly” even when each one solves.
What to check first
- Get a Ray ID and timestamp from one affected user. The challenge page footer shows it. One concrete event beats ten paraphrased complaints.
- Which service issued the challenge. Security > Events, filter by the Ray ID or the user’s IP: Service says Security Level, Custom rules, or a bot product. The fix lives with the issuer.
- What the affected users share. Same VPN provider, same corporate proxy, same browser (Brave shields, Firefox strict tracking protection, Tor), or same ISP behind CGNAT.
- Whether you inject security headers at the edge. A Transform Rule, Worker, or app adding CSP to all responses is a self-inflicted loop for every visitor who gets challenged.
How to verify
Reproduce the challenge and inspect what a failing client sees:
# Fetch the page: a challenge shows 403 (or 503) + cf-mitigated: challenge
curl -s -D /tmp/chal-headers.txt -o /tmp/chal.html "https://www.example.com/account"
grep -iE "^(HTTP|cf-mitigated|cf-ray)" /tmp/chal-headers.txt
grep -oE "Cloudflare Ray ID: [a-f0-9]+" /tmp/chal.html
# Check whether your edge injects CSP onto the challenge response itself
grep -i "content-security-policy" /tmp/chal-headers.txt
Read the loop signature in the dashboard:
Security > Events
Filter: IP equals <user IP>, last 30 minutes
Loop shape A: Managed Challenge issued, issued, issued - never Solved
Loop shape B: Solved, then issued again within seconds from a nearby IP
Then test from a clean IP and a stock browser: if you sail through from a residential connection with default settings, the zone logic is reputation- or client-specific, not global — which narrows the fix to exemptions rather than rule changes.
The fix
- Fix the issuer, not the symptom. Security Level too high: lower it a notch or exempt the affected route. Under Attack Mode left on: turn it off or scope it. A custom rule: narrow its expression or switch its action.
- Prefer Managed Challenge over JS or Interactive challenges in your own rules. Managed Challenge lets Cloudflare choose the lightest test that fits and has the best legitimate-solve behaviour; legacy JS Challenge rules are a common loop source on privacy browsers. Rule actions are covered in WAF custom rules: block, challenge, log, skip.
- Stop challenging machine endpoints. A challenge served to an XHR, mobile app, or webhook cannot be solved — the user sees broken features, not a challenge page. Skip or exempt
/api/*and webhook paths, and let form abuse be handled by Turnstile instead. - Remove edge-injected CSP from challenge responses. If a Transform Rule or Worker sets Content-Security-Policy, either set the header at the origin only or exclude challenge responses; the challenge script must load from
challenges.cloudflare.com. - Handle the shared-IP crowd with scope, not volume. For a partner or office on a flagged VPN/proxy, add a scoped exception (their stable egress IP or ASN plus your specific paths) rather than lowering security for everyone.
- Lengthen Challenge Passage if re-challenges are the complaint. Thirty minutes is the default; a longer passage converts “constant” challenges into once-a-session.
- Give the affected user a workaround while you fix. Allow cookies and JavaScript for the site, disable shields/strict mode for the domain, try without the VPN. That is triage, not the fix.
When this fix is wrong
If the “user” turns out to be automation — a monitoring agent, a scraper someone in-house wrote, an RPA browser — the challenge is doing its job; the answer is a proper exemption or a bot-tier decision, as laid out in bot management tiers, not a loosened challenge. And if only one person on one machine loops while thousands pass, spend your effort on that machine’s extensions and clock, not on zone settings.
Common mistakes
- Telling users to “use Chrome” and closing the ticket — the silent majority just leaves.
- Reading Solved-then-issued-again as a broken challenge when it is the VPN rotating exit IPs between requests.
- Challenging static assets and API routes, so the challenge fires where no human can see it.
- Injecting CSP or other security headers at the edge onto every response, including Cloudflare’s own challenge pages.
- Setting Challenge Passage to a few minutes during an incident and forgetting to restore it.
Prevention
Keep challenge actions on Managed Challenge, keep machine paths exempt by design, and watch the solve-rate: a healthy zone shows solves tracking issues closely, and a growing issued-to-solved gap is your early warning that real users are hitting walls. Challenge behaviour and clearance cookies are documented under developers.cloudflare.com/fundamentals/.
Tuning edge security so it blocks attacks without blocking customers is ongoing work — Stack Harbor watches those events around the clock under 24/7 Monitoring & Response; book a monitoring and response review.