Firebase Realtime Database public access check

Paste database.rules.json or drop your project folder to see whether your Realtime Database is readable or writable by anyone.

Run the check

Drop a project folder or files here

node_modules, .git, virtualenvs and build folders are skipped. Limit 25 MB / 5,000 files.

The Python engine (Pyodide, a few MB, cached by your browser) loads when you start.

The mistake

A Realtime Database rule such as ".read": true or ".write": true, the test-mode rule "now < <timestamp>", or a rule that only checks auth != null.

Why it is dangerous

Realtime Database rules cascade: a true at a path grants access to that path and everything below it, and deeper rules cannot take it back. Anyone with your database URL (it is in your web app's config) can read or overwrite that whole subtree with a plain HTTP request. auth != null grants every signed-in user access to the whole subtree, including other users' data, and anyone can create an account with your public config.

How to fix it

Scope access to the signed-in owner:

{
  "rules": {
    "users": {
      "$uid": {
        ".read": "auth != null && auth.uid === $uid",
        ".write": "auth != null && auth.uid === $uid"
      }
    }
  }
}

Keep ".read": true only on paths that hold genuinely public data, and never ".write": true.

What this checker looks for

This page runs firebase-launch-check, which reads firestore.rules, storage.rules, database.rules.json, firebase.json and app code. The rules most relevant to this page:

RuleWhat it finds
FLC201Realtime Database open to everyone (".read"/".write": true)
FLC202Realtime Database test-mode rule (open until a date)
FLC203Realtime Database only checks "signed in" (auth != null)
FLC301Service account private key in the project
FLC302Admin SDK (firebase-admin) in client code

Every finding has a rule id, a severity, file:line, the offending line (secrets masked), why it matters and how to fix it. Run firebase-launch-check rules for the full list.

FAQ

Is the database URL a secret?

No. It is in your web app's Firebase config, which every visitor downloads. Your rules are the only thing protecting the data.

Does it check service account keys?

Yes. A service account private key in the project (FLC301) or firebase-admin imported in client code (FLC302) is reported, because the Admin SDK ignores every security rule.

Are my files uploaded anywhere?

No. The checker is Python running inside your browser tab (Pyodide, WebAssembly). Your files are read with the browser's File API and written into an in-memory file system that exists only in this tab. Your files are never sent anywhere. The only network requests load the Python runtime and the checker code, plus Google Analytics page-view counting, which never sees your files. You can disconnect from the internet after the engine has loaded and the scan still works.

Is a clean report a guarantee?

No. It is a static check for known patterns, not a penetration test. A clean report means none of these patterns were found, nothing more.

Can I run the same check on my machine or in CI?

Yes. Every checker on this site is an open-source command-line tool (MIT licence, Python 3.10+ standard library only). The results here are the same as `scan --json` on the command line, except for checks that need git (whether a file is committed or ignored), which cannot run in a browser.