Are my Supabase Storage files public? Buckets, RLS and signed URLs
Short answer: it depends on the bucket. A public Supabase Storage bucket serves every file to anyone who has its URL, with no policy check on the download. Private buckets keep downloads behind RLS on storage.objects (or a short-lived signed URL). Upload, delete, move and copy still need policies even on a public bucket. LatchDog's outside scan does not test Storage buckets or their policies, so the checks below are yours to run in the dashboard and SQL editor.
What "public" actually means
Supabase's bucket fundamentals page: "When a bucket is designated as 'Public,' it effectively bypasses access controls for both retrieving and serving files within the bucket. This means that anyone who possesses the asset URL can readily access the file." And: "Access control is still enforced for other types of operations including uploading, deleting, moving, and copying." Buckets are "private by default." Public buckets are "more performant than private buckets since they are cached differently." (Supabase: Storage Buckets / fundamentals, read Nov 13, 2026.)
Public URLs look like:
https://[project_id].supabase.co/storage/v1/object/public/[bucket]/[asset-name]
The SDK's getPublicUrl builds the same path (Supabase: Storage serving / downloads, read Nov 13, 2026). That is fine for avatars and blog images. It is a leak when receipts, contracts or other user uploads land in the same bucket, because the URL ends up in HTML, API responses, emails and browser history.
The other traps
- Listing is not the same as reading. For a private bucket you can allow reading a single object without allowing a visitor to list everything in the bucket. Supabase's access-control page says: if you need different SELECT policies for different Storage actions, such as listing objects versus reading authenticated objects, use the operation-aware helpers
storage.allow_only_operation()andstorage.allow_any_operation(). For an avatars-style SELECT on a private bucket it notes: "The allow_any_operation() filter is critical here as without it users would be able to list the bucket contents." And: "This is not needed for public buckets, as they are already publicly accessible" (Supabase: Storage access control, read Nov 13, 2026.) - No policy means no uploads. "By default Storage does not allow any uploads to buckets without RLS policies." The usual AI-app mistake is the opposite: a "make uploads work" policy with
with check (true)that lets anyone with your publishable key write anywhere. - Upsert needs more than INSERT. "To allow overwriting files using the upsert functionality you will need to additionally grant SELECT and UPDATE permissions."
owner_idalone is not a lock. Ownership is stored inowner_id(the olderownercolumn "is deprecated and will be removed"). "By itself, the ownership of a resource does not provide any access control" — you still write a policy that comparesowner_idto the caller. Supabase says: "When using the service_key to create a resource, the owner will not be set and the resource will be owned by anyone. This is also the case when you are creating Storage resources via the Dashboard." (Supabase: Storage ownership, read Nov 13, 2026.)- The secret key bypasses Storage RLS. "Service keys entirely bypass RLS policies, granting you unrestricted access to all Storage APIs. Remember you should not share the service key publicly." Same rule as for tables:
sb_secret_/service_rolenever belong in the browser (see is the Supabase anon key safe to expose?). - Security Advisor lint
0025 public bucket allows listing. Listed among Advisor's security checks (Supabase: Advisors, read Nov 13, 2026). That page names the lint but does not define it. Run Security Advisor after bucket changes; our guide to rls_disabled_in_public and the other Advisor errors covers the related table lints. - The October 30, 2026 Data API grants change (changelog 45329, read Nov 13, 2026) is about tables in the
publicschema and the Data API. Its FAQ asks: "Does this affect tables in the storage, auth, realtime, or custom schemas?" and answers: "No. The change touches default privileges in the public schema. Tables in storage, auth, realtime, and any custom schemas you expose via the Data API keep their current grants and their current defaults." It does not change how public vs private buckets work.
Keep private files private (example)
These examples are for a private per-user documents bucket. Leave intentionally public assets (avatars, marketing images) in a separate public bucket.
- In the dashboard, confirm which buckets are public: or run
select id, public from storage.buckets; - Move user-specific files into a private bucket (for example
documents). Switching an existing bucket from public to private breaks any stored public URLs, so plan the cutover. - Upload under the owner's id, for example
USER_ID/filename. Supabase's own example usesstorage.foldername(name)for the first path segment. - Write owner-scoped policies on
storage.objects:create policy "upload own documents" on storage.objects for insert to authenticated with check ( (select auth.uid()::text) = (storage.foldername(name))[1] and bucket_id = 'documents' ); create policy "read own documents" on storage.objects for select to authenticated using ( (select auth.uid()::text) = (storage.foldername(name))[1] and bucket_id = 'documents' ); create policy "update own documents" on storage.objects for update to authenticated using ( (select auth.uid()::text) = (storage.foldername(name))[1] and bucket_id = 'documents' ) with check ( (select auth.uid()::text) = (storage.foldername(name))[1] and bucket_id = 'documents' ); create policy "delete own documents" on storage.objects for delete to authenticated using ( (select auth.uid()::text) = (storage.foldername(name))[1] and bucket_id = 'documents' );
Supabase's docs also show an
owner_idform:owner_id = (select auth.uid()::text)for delete, and(select auth.jwt()->>'sub') = owner_idfor select. Prefer one pattern and stick to it. The folder-per-user form above uses(select auth.uid())cast to text so it matches the path segment; review the cast against your upload code. - Serve private files with a short-lived signed URL from server code (
createSignedUrlwith an expiry in seconds), after you have checked that the requester is allowed to see the file. Private assets can also be fetched at/storage/v1/object/authenticated/...with the user's Authorization header.
How to test
- List buckets:
select id, public from storage.buckets;— everypublic = truerow should be intentional. - List policies:
select policyname, cmd, roles, qual, with_check from pg_policies where schemaname = 'storage' and tablename = 'objects';Look fortrueconditions,anonon private data, and SELECT policies that do not check the owner or folder. - Signed out, open a private-bucket file URL — it should fail. A public-bucket URL should load only if that file is meant to be public.
- Sign in as a second test user and try to list or download the first user's folder — both should fail.
- Run Security Advisor and fix
public bucket allows listingand related findings before you ship.
Related: Supabase RLS for vibe-coded apps, rls_disabled_in_public and other Advisor errors, is the Supabase anon key safe to expose?, and how to monitor your Supabase app for leaked keys and open RLS.
Paste-in fix prompt
Review my Supabase Storage setup before I publish. Please: 1. List every bucket and whether it is public. For each public bucket, say whether every file in it is meant to be public. Move user-specific files into a private bucket. 2. Show every policy on storage.objects. Replace any with check (true) or using (true) on private data with owner-only policies, one per operation, written "to authenticated", scoped to the bucket, and matching the first path folder to (select auth.uid()::text) via storage.foldername(name) — or to owner_id, if that is how we store ownership. Upsert needs SELECT and UPDATE as well as INSERT. 3. Make sure private downloads use createSignedUrl (short expiry) or the authenticated object URL, never a /object/public/ URL. 4. Search the code for sb_secret_ and service_role; those must not be in the browser. 5. Do not make a private bucket public to "fix" a download, do not disable RLS, and do not change unrelated code. Show me the SQL and the list of buckets first, then explain who can read and write what afterwards.
Check yours
Run select id, public from storage.buckets; and Security Advisor now. Then run the free LatchDog check on your live URL: it will not find a public Storage bucket, but it will look for a leaked secret key that would bypass Storage RLS entirely.
What LatchDog does here (and doesn't)
LatchDog does not test Supabase Storage. Its Supabase check only sends read requests to the Data API (/rest/v1/…): after you verify your domain, one SELECT ... LIMIT 1 to each of up to 15 tables or views your site's code names with .from("..."), recording only whether a row came back. It never calls /storage/v1/, never lists buckets, never downloads objects, and cannot see storage.objects policies. A public bucket, a listing policy, or a missing owner check will not show up in a LatchDog report. Use the SQL above and Security Advisor for Storage; use LatchDog for leaked keys in your live JavaScript, exposed .env/.git, headers/HTTPS, and (deep scan) whether named tables or views return rows to the publishable key.
LatchDog keeps watching your live app after launch. Starter ($19/month, up to 3 apps) and Pro ($39/month, up to 10 apps) re-scan it automatically every day and after every deploy (triggered by a deploy hook from your host or CI), and email you only when something changes. Nothing to install: you verify your domain once.
- Free check, no sign-up: security headers, HTTPS, leaked secret keys in JavaScript and source maps (shown masked), public source maps, exposed
.env/.git. It does not test your database or Storage. - Deep scan, verified domain only: higher limits, CORS, and the Supabase table/view SELECT above. Not Storage.
- Plans: Free includes the free check and one deep scan after verification. Starter $19/month (3 apps), Pro $39/month (10 apps); both daily + per-deploy (deploy hook; at most once every 10 minutes and 48 a day per app), change-only emails. Full Report $9 once (30-day credit toward first month if you subscribe within 30 days, once per account). 7-day full refund: email support@latchdog.com within 7 days of a payment.
- Limits: no Storage, no policies/grants/triggers, no sign-in as a user. Outside-in check, not a penetration test.
Keep watching your app, not just checking it once
LatchDog keeps watching your live app after launch. Starter ($19/month, up to 3 apps) and Pro ($39/month, up to 10 apps) re-scan it automatically every day and after every deploy (triggered by a deploy hook from your host or CI), and email you only when something changes. Nothing to install: you verify your domain once.
Start with the free check (headers, HTTPS, leaked keys in your JavaScript, source maps, .env/.git). Open-table checks run after you verify your domain. See plans
Free, read-only public check: no sign-up, no card. Headers, HTTPS, leaked keys in your JavaScript (always masked), public source maps and exposed .env/.git files. Supabase table checks run after you verify you own the domain.
Want the open-table check too? Get my free deep scan: sign in with your email (no password) and verify you own the domain. Your first deep scan is free and adds CORS, more of your JavaScript and, if your app uses Supabase, whether anyone can read its tables and views with your public key.