ScanVibeScanVibe
Hosting & Deployment

Is Cloudflare Pages Safe?

Security analysis for apps built with Cloudflare Pages. JAMstack deployment platform with Cloudflare Workers, KV storage, and global CDN.

Is Cloudflare Pages safe? The short answer

Cloudflare Pages is a safe place to host a web app: deployments are served over HTTPS from Cloudflare's network, with its DDoS protection in front. Hosting on Pages does not introduce vulnerabilities by itself.

What Pages does not do is decide which data your build exposes. A static site or single-page app is a bundle of files anyone can download, and anything inlined into it at build time is public. Preview deployments are reachable on the internet by default. And unless you configure them, the security headers your app needs are not added for you. Most issues we find on Pages-hosted, AI-built apps come from those three areas.

Scan your Cloudflare Pages app now

Enter your URL and get a full security report in 30 seconds. Free, no signup required.

Scan Your Cloudflare Pages App

Cloudflare Pages misconfigurations we see in AI-built apps

Secrets inlined into the client build

Environment variables used by the framework at build time end up in the JavaScript bundle when they are referenced from client code, and variables prefixed with NEXT_PUBLIC_ or VITE_ are designed for exactly that. A secret placed there is published with every deployment. Secrets belong in Pages Functions or another backend, read from context.env.

Secrets stored as plain variables

Pages lets you store a value either as plain text or encrypted as a secret. API keys and tokens should use the secret type, so they are not displayed in the dashboard once saved.

Public preview deployments

Each branch or pull request deployment gets its own *.pages.dev URL, which is public by default. Previews often point at staging data, debug settings or unfinished admin pages. Protect them with Cloudflare Access if they should not be public.

No security headers

Headers such as Content-Security-Policy, Strict-Transport-Security and X-Frame-Options are not set unless you add them. A _headers file in your build output applies them to static assets; responses generated by Pages Functions must set their own headers.

Cloudflare Pages security checklist

A starting _headers file in your build output directory:
/*
  Strict-Transport-Security: max-age=31536000; includeSubDomains
  X-Content-Type-Options: nosniff
  X-Frame-Options: DENY
  Referrer-Policy: strict-origin-when-cross-origin
  Permissions-Policy: camera=(), microphone=(), geolocation=()

Common Security Issues in Cloudflare Pages Apps

Exposed API Keys

AI coding tools often embed API keys directly in frontend JavaScript. If you're using Cloudflare Pages, check that secret keys aren't in your client-side bundle.

Missing Security Headers

Headers like Content-Security-Policy, Strict-Transport-Security, and X-Frame-Options protect against XSS, clickjacking, and downgrade attacks.

Vulnerable Dependencies

Outdated npm packages with known CVEs are common in AI-generated code. Regular audits catch these before attackers do.

Authentication Weaknesses

Open registration endpoints, missing rate limiting, and exposed auth tokens are frequent issues in vibe-coded apps.

What ScanVibe Checks

✓SSL/TLS Configuration
✓Security Headers
✓Exposed Secrets & API Keys
✓Vulnerable Libraries
✓Exposed Files & Configs
✓Supabase Misconfigurations
✓Firebase Misconfigurations
✓Auth Endpoint Security

Frequently Asked Questions

Is Cloudflare Pages safe to use?

Cloudflare Pages itself is a reputable platform, but apps built with Cloudflare Pages often have security misconfigurations — exposed API keys, missing security headers, and vulnerable dependencies. ScanVibe scans your app to find these issues.

What security issues do Cloudflare Pages apps commonly have?

The most common issues we find in Cloudflare Pages apps are: exposed API keys in frontend JavaScript, missing security headers (CSP, HSTS), outdated dependencies with known vulnerabilities, and misconfigured authentication endpoints.

How do I check if my Cloudflare Pages app is secure?

Enter your app's URL in ScanVibe's scanner. We'll check for exposed secrets, security headers, vulnerable libraries, exposed files, and platform-specific misconfigurations — all in about 30 seconds.

Does ScanVibe scan Cloudflare Pages specifically?

Yes. ScanVibe detects Cloudflare Pages in your stack and runs platform-specific security checks in addition to our standard 8-category analysis.

Are Cloudflare Pages environment variables secret?

Only if they stay on the server side. Variables read in Pages Functions remain on Cloudflare's side, but any variable your framework inlines into the client bundle at build time, such as NEXT_PUBLIC_ or VITE_ variables, is visible to every visitor. Store API keys as encrypted secrets and use them only in Functions.

Are Cloudflare Pages preview deployments public?

Yes, by default each preview deployment has its own public pages.dev URL. If previews contain unreleased features or connect to real data, enable Cloudflare Access protection for preview deployments in your project settings.

Other Hosting & Deployment to Check

Don't guess — scan.

Find security issues in your Cloudflare Pages app before attackers do.

Scan Your App Now