#4 of 10high

File storage open to everyone

A storage bucket is open when it's marked public or its policies let anonymous visitors read or list files. Anyone with a file's link can download it, and if listing is allowed they can find every file. The fix: make buckets that hold private files private, add per-user storage policies, and serve private files through short-lived signed URLs.

Where it shows up: Supabase Storage and Firebase Storage

Are you affected? The 60-second check

In Supabase → Storage, every bucket marked Public serves its files to anyone with the link. That's fine for logos, not for invoices or ID photos.

Check whether a stranger can list a bucket's files, using only the anon key from your own site's code:

Terminal
curl -X POST "https://YOUR-PROJECT.supabase.co/storage/v1/object/list/YOUR_BUCKET" \ -H "apikey: YOUR_ANON_KEY" -H "Authorization: Bearer YOUR_ANON_KEY" \ -H "Content-Type: application/json" -d '{"prefix":""}'

An empty list or an error means listing is closed. File names coming back mean anyone can see what's in the bucket. In Firebase, open Storage → Rules and look for reads allowed with if true or no condition.

What it is

Apps store uploads such as avatars, invoices and documents in storage buckets. A bucket marked public, or with rules that allow anonymous reads, serves every file to anyone.

It's easy to make a bucket public to get an image showing, then start storing private files in the same bucket later.

How often we see it

We ran Shippable's static checks on about 25,000 public GitHub repos built with five AI tools (October 2026). Each figure is the share of that builder's repos where the check fired at least once. A dash means we saw it in under 1% of that builder's repos. Full method and breakdown: Which AI builder ships the safest apps?

FindingBoltLovableCursorReplitv0
Public storage bucket1.8%––––
Storage bucket open to everyone8.5%1.6%–––

What an attacker sees

Anyone who knows or guesses a file's path can download it. If listing is allowed too, they can see every file in the bucket.

How to fix it

Paste this into your AI tool:

Paste the prompt below into your vibecoding tool

Security fix: my storage bucket is public. Make it private and add storage policies so only authorized users can read their own files. Keep a separate public bucket only for assets that are meant to be public, like logos.

Or by hand:

  1. In Supabase → Storage, set each bucket to Private unless it only holds truly public assets, then add access policies.
  2. In Firebase, update Storage rules so reads require `request.auth != null` and match the file's owner.
  3. Re-scan to confirm.

Mistakes that look fixed but aren't

  • Strict policies on a public bucket. Public buckets serve files by URL regardless of read policies, so the bucket itself has to be private.
  • Making a bucket private but still calling getPublicUrl() in the app. Switch to createSignedUrl() so links expire.
  • Guessable file paths like user-id/avatar.png in a public bucket. Anyone who knows a user ID can fetch the file.
  • Starting with a public bucket for images, then storing private uploads in the same bucket later.

Check your app

Shippable asks your storage for its bucket list as an anonymous visitor and flags buckets marked public. For Firebase Storage it checks whether files can be listed without logging in. It never downloads your files.

Scan your dev server before you push. No account needed:

Terminal
npx shippable-dev scan localhost:5173

Or scan your live app in the browser:

FAQ

Is a public Supabase bucket ever OK?

Yes, for files that are meant for everyone: logos, product images, public avatars. Keep anything personal or paid-for in a separate private bucket.

What's the difference between a public bucket and storage policies?

A public bucket lets anyone download a file if they have its URL. Storage policies (RLS on storage.objects) control listing, uploading, updating and deleting, and reading from private buckets.

How do I show a private file in my app?

Create a signed URL on demand (createSignedUrl in Supabase, getDownloadURL behind auth rules in Firebase). It works for a limited time and only for users your policies allow.