Anyone may be able to list and download your Firebase files.
Updated 2026-10-14 · Plain English, written for founders who built with Lovable, Bolt, Cursor or similar.
Firebase Storage holds the files your users upload: avatars, receipts, ID photos, exports. Your app's firebaseConfig names the bucket (storageBucket), and that is public by design. What decides who can touch the files is Storage security rules. If they say allow read, write; with no condition, or if true, anyone can list every file name, download every file, and upload or overwrite files, with no login.
Test mode for Storage works like Firestore: rules with if request.time < timestamp.date(...) that are open to everyone until the date, then refuse everyone after it. Rules that only check request.auth != null are a quieter version of the same problem: any signed-in account can read every other user's files.
Check from the outside
This is what a stranger does. Open your live app, open DevTools, and search the loaded JavaScript for storageBucket. The value looks like your-project.appspot.com or your-project.firebasestorage.app. Then ask for a listing, without logging in:
curl "https://firebasestorage.googleapis.com/v0/b/YOUR-BUCKET/o?maxResults=1"
200withitemsorprefixes: anyone can list your files. If they can list, they can almost always download too.200with no items: anonymous listing is allowed; the bucket is just empty right now. Fix the rules before your users upload anything.403: anonymous listing of the root is refused. Good. Check the folders your app writes to as well, by adding&prefix=users/or similar.
A single file is downloaded from …/o/ plus its URL-encoded path plus ?alt=media. If a listing worked, try one of your own files that way to see whether reads are open too.
Only do this against your own project.
Check the rules file
Open storage.rules in your repo, or Storage > Rules in the Firebase console, which shows what is deployed. Look for:
allow read, write;orallow read, write: if true;: open to everyone.if request.time < timestamp.date(...): test mode, open to everyone until that date.match /{allPaths=**}with a loose condition: one rule that covers the whole bucket.if request.auth != nullon user uploads: every signed-in user can read and replace everyone's files.
Fix it
Give each user their own folder, and only let them into it. Upload files to users/<uid>/… from your app, then:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /users/{uid}/{allPaths=**} {
allow read, delete: if request.auth != null
&& request.auth.uid == uid;
allow create, update: if request.auth != null
&& request.auth.uid == uid
&& request.resource.size < 10 * 1024 * 1024
&& request.resource.contentType.matches('image/.*');
}
// Files meant for everyone, written only by your server.
match /public/{allPaths=**} {
allow read;
allow write: if false;
}
}
}
Deploy with firebase deploy --only storage, or paste into the Rules tab and publish.
- Anything not matched is denied. Remove the old
match /{allPaths=**}rule instead of tightening it. - Limit size and type on upload. Without it, an open or loosely checked bucket can be used to host anyone's files on your bill. Adjust the size and
contentTypeto what your app really accepts. readcovers bothgetandlist. If users should open a file by its link but never browse a folder, writeallow getinstead ofallow read.- Your server is unaffected. The Admin SDK ignores security rules, which is why the
publicfolder above is written from a backend or Cloud Function.
Download URLs are a separate key
A link from getDownloadURL() includes a token= parameter. Anyone with that link can download the file, whatever your rules say. Fixing the rules does not stop links that were already handed out. If one was shared or stored somewhere public, revoke that file's access token in the Firebase console so the old link stops working.
What SecureIndie checks
- On your live site: one anonymous, read-only request to list at most one file in the bucket your site's code names. File names are not kept, and nothing is downloaded.
- In your repo, when you connect it:
storage.rules, including test-mode dates that have not passed yet. A rules file can differ from what is deployed, so these findings say they were read from code.
After the fix
- Re-run the listing curl. It should now return
403. - Sign in as one test user and try to download a second test user's file by its path. It should be refused.
- If the bucket held personal files while it was open, read what to do if data leaked.
Check your app
SecureIndie looks for this mistake. The free quick check covers the basics from outside (exposed files, keys in your site's code, headers) in about a minute. Database rules, payment webhooks and AI endpoints need the full audit, which also reads your code and proves what a visitor can actually reach.
Questions
What does allow read, write; with no condition mean?
It allows the request unconditionally. Anyone, signed in or not, can list, download, upload, replace and delete files under that path.
I fixed the rules. Are old download links still working?
Yes. A URL from getDownloadURL carries a token and works regardless of rules. Revoke the token for a file in the Firebase console if that link should stop working.
Is it a problem if people can only list files, not read them?
Listing alone shows names, and file names often contain user ids, emails or invoice numbers. In practice allow read grants both listing and downloading, so they usually come together.
Related guides
Checks covered: FB-RULES-004, FB-STORAGE-007 · If you think data already leaked