Blog/Cloud Security

One Request, Hundreds of Client Records: The Firebase Mistake We Keep Finding

Firebase makes it easy to ship fast. It also makes it easy to leave your Firestore database open to the internet without realising it. Here is what we found, why it keeps happening, and how to check your own project in 10 minutes.

Ouroboros Security Team4 October 20266 min read

Firebase is great. You can get a website with a database, a contact form and notifications running in an afternoon, without managing a single server. That speed is exactly why it's everywhere. It's also why we keep finding the same problem: a Cloud Firestore database that anyone on the internet can read.

What We Found

During a recent authorised test of a professional services firm's website, we looked at how the site's contact and notification features worked. The site stored submitted data in a Firestore collection. With a single unauthenticated request — no login and no special tools — we could list that collection. One response returned hundreds of records: client names, contact details, fiscal information, and details about third parties the firm was dealing with on clients' behalf.

We confirmed the data could be read, checked that writing was blocked, and stopped there. Then we reported it privately to the firm so they could close it.

Why This Keeps Happening

Firestore has no traditional backend sitting in front of it. The browser talks to the database directly. The only thing standing between a visitor and your data is your Security Rules. The catch is that your Firebase config (project ID, API key) is visible in your site's JavaScript. That's by design and not a secret — it does mean anyone can see which project you use and send requests to it themselves, outside your website. So if the rules are too loose, your website's UI doesn't matter. Someone can skip it and ask the database directly.

We usually see one of three causes: test mode that never ended (Firebase offers an open "test mode" to get started quickly, and somebody means to lock it down later — later never comes); rules written for writes but not reads (a contact form needs anonymous visitors to create a record, but the rule also lets anyone read or list everything); or agency handover (the site was built by a freelancer or agency, handed over, and nobody on the client side knows the rules exist).

How to Fix It

For a typical contact-form-saves-to-Firestore setup, allow create with strict field validation and explicitly deny read, update, and delete. Then go further: only staff should read submissions, through authenticated access or the Firebase console, never through public rules. Consider moving writes to a Cloud Function so the database itself stays closed to the public. Turn on App Check as an extra layer. And don't keep what you don't need — if submissions get emailed to the team, delete old records on a schedule.

How to Check Your Own Project in 10 Minutes

Open the Firebase console, go to Firestore, then Rules. Look for "if true" anywhere. Check for rules that allow read without request.auth != null. Use the Rules Playground in the console to simulate an unauthenticated read of each collection. Do the same for Realtime Database and Cloud Storage — they have their own separate rules. And check the Firebase dashboard for any "your rules are insecure" warnings you've been ignoring.

The Takeaway

If your site uses Firebase, your Security Rules are your backend security. They deserve the same review as any server code. If you're not sure yours are right — or the person who wrote them has moved on — we're happy to take a look. Book a 15-minute call for a quick review of your Firebase or cloud setup.

FirebaseFirestoreCloud SecurityMisconfigurationGDPR

Want us to test your environment?

Our team of OSCP-certified testers can identify the vulnerabilities discussed here — and the ones you haven't thought of yet.

See our Cloud Security Assessment service
Get in touch