Check provider logo

Cloudflare R2 bucket is not publicly readable through r2.dev

r2_bucket_public_dev_url_disabled

Severityhigh
Servicer2
by Prowler

Cloudflare R2 buckets are assessed for public r2.dev access, which makes every object in the bucket readable by anyone on the internet through a *.r2.dev URL.

Risk

A bucket with r2.dev access enabled is publicly readable without authentication.

  • Confidentiality: every object, including backups, exports or user uploads, can be downloaded
  • Availability and cost: r2.dev traffic is rate limited and bypasses caching, WAF and Access controls
  • Discovery: public bucket URLs are routinely enumerated by attackers
Run this check with Prowler CLI

prowler cloudflare --checks r2_bucket_public_dev_url_disabled

Recommendation

Keep r2.dev access disabled for every bucket.

  • Serve intentionally public content through a custom domain protected by WAF, caching and Access
  • Use presigned URLs or a Worker for authenticated access
  • Review which buckets hold sensitive data

Remediation

Terraform
Other
  1. Log in to the Cloudflare dashboard and select your account
  2. Go to R2 Object Storage and select the bucket
  3. Open Settings > Public Development URL
  4. Click Disable and confirm

Source Code

Resource Type

R2Bucket

References