Skip to content
BuildThenTestedSee packages

Firebase security: defaults, what breaks, what to check

Firebase is Google's app platform with Firestore, Realtime Database, Cloud Storage, Authentication and client SDKs that talk to the backend directly. Below: what it configures by default according to its own documentation (verified 2026-09-21), the 15 patterns most associated with it, the security features the vendor offers and where they stop, and a checklist you can run without buying anything.

The fetched pages did not state a time limit on test mode rules, so no expiry figure is recorded.

Firebase's client SDKs talk to Firestore, Realtime Database and Storage directly from the browser or app, so Security Rules are the whole access layer. When you create a database you choose Locked mode (deny all) or Test mode (allow anyone).

Firebase's docs state that API keys only identify the project, that server SDKs bypass rules, and that Firebase alerts you when rules allow open access. Testing a Firebase app is mostly reading the rules and trying them from a second account, with App Check and the Rules Playground as the vendor's own tools.

Firebase defaults that matter for testing

Each row is taken from the vendor's documentation on the date shown. Defaults change; the date is the claim.

Defaults of Firebase as documented by the vendor
AreaDefaultSource
Default rules for new Firestore / RTDB (locked vs test mode)When creating a database you choose Locked mode (default rules deny access to all users) or Test mode (allow anyone access). For Cloud Storage, locked mode restricts access to authenticated users.docs · verified 2026-09-21
Test modeFirestore test mode is good for getting started with client libraries but allows anyone to read and overwrite your data; production mode denies all reads and writes from mobile and web clients.docs · verified 2026-09-21
API key exposure modelFirebase API keys only identify the project; authorization is handled by IAM, Security Rules and App Check, so keys restricted to Firebase services do not need to be treated as secrets.docs · verified 2026-09-21
Server SDK scopeServer client libraries bypass all Firestore Security Rules and authenticate with Application Default Credentials; rule updates take up to a minute to affect new queries and up to 10 minutes to propagate fully.docs · verified 2026-09-21
Open rulesRules that allow read/write to all users let anyone overwrite the database; Firebase sends an alert when data is not properly secured, per the insecure rules page.docs · verified 2026-09-21

Documentation home: firebase.google.com/docs

What breaks in Firebase projects

27 patterns in the catalogue name Firebase; the most severe are listed here across secrets and keys, data access, login and permissions, ai features, deploy and config, mobile. Attribution is descriptive: the default stack makes the pattern reachable, or a public incident names it.

Public incidents

Lovable reported that from 3 February to 20 April 2026 a backend regression let any logged-in Lovable user read the chat history and source code of public projects; a fix shipped within two hours.

  • 2026-02-03 to 2026-04-20 Exposure window
  • 2026-02-22 First HackerOne report
  • about 2 hours Time from public report to fix

Apr 2026 · Lovable · all sources

One education app built on Lovable had 16 vulnerabilities, 6 critical; a database function denied callers whose role was 'authenticated', so anonymous callers passed and 18,697 user records were readable without login.

  • 16 Vulnerabilities found
  • 6 Critical
  • 18,697 User records exposed
  • 14,928 Unique email addresses
  • 870 Enterprise users with full PII

Feb 2026 · Taimur Khan · all sources

A scan of 1,645 Lovable-built apps found 170 (about 10.3%) with database endpoints readable without login because Supabase row-level security policies were missing or too broad; recorded as CVE-2025-48757, CVSS 9.3.

  • 1,645 Apps scanned
  • 170 Apps with inadequate RLS
  • 10.3% Share of scanned apps
  • 303 Exposed endpoints
  • 9.3 Critical CVSS 3.1 base score (CVE record)
  • 8.26 Researcher's own CVSS base score
  • 2025-03-21 Scan date
  • 2025-05-29 Public disclosure

May 2025 · Matt Palmer (Replit, Inc.) · all sources

On the Base44 app builder, undocumented registration and one-time-password endpoints accepted a non-secret app_id, so anyone could create a verified account on a private app; Wix fixed it within 24 hours.

  • 2025-07-09 Reported to Wix
  • 2025-07-10 Fix verified
  • under 24 hours Time to fix
  • 2025-07-29 Public disclosure

Jul 2025 · Wiz Research · all sources

Each entry links to its primary source in the evidence list. What to do about it is the self-check below.

Firebase's own security features, and where they stop

Stated from the vendor's documentation. The limits are the vendor's scope statements, not judgements.

  • Rules Playground (simulator)

    Simulates reads or writes at a path as unauthenticated, anonymous or a specific user, for Realtime Database, Firestore and Cloud Storage.

    Where it stops: The docs direct you to the Firebase Emulator for full validation and automated unit tests.

    vendor docs · verified 2026-09-21

  • App Check

    Attests that requests come from your authentic app or an untampered device, for Firestore, Realtime Database, Cloud Storage, callable Cloud Functions and other services, with monitoring and enforcement configured separately.

    Where it stops: The docs state App Check prevents some, but not all, abuse vectors directed at your backends.

    vendor docs · verified 2026-09-21

  • Security Rules

    Per-path rules for Firestore, Realtime Database and Cloud Storage, editable in the console or CLI.

    Where it stops: Rules apply to client SDK traffic only; server SDKs bypass them.

    vendor docs · verified 2026-09-21

  • Insecure rules alerts

    Firebase alerts you when your data is not properly secured and documents common rule mistakes to fix.

    Where it stops: The page does not specify the alert channel or timing.

    vendor docs · verified 2026-09-21

Check it yourself, in this order

The critical patterns first. Each uses the dashboard and your browser.

Secrets committed to the code repository

  1. Open your project on GitHub (or the code view in your builder) and look at the file list for .env, .env.local, .env.production, serviceAccountKey.json or firebase-adminsdk files.
  2. Use the repository search box and search for sk_live, sk-, service_role, BEGIN PRIVATE KEY and password=.
  3. If you have the code on your computer, run one command in the project folder: git log --all -p -S sk_live -- . | head. Any output means a live key has been committed at some point.
  4. On GitHub, open Settings, then Code security, and check whether Secret scanning shows alerts.
  5. A bad result is any env or key file in the file list, any search hit that shows a real key, or an open secret scanning alert.

Firebase rules left in test mode

  1. Open the Firebase console, choose your project, then Firestore Database (or Realtime Database, or Storage) and open the Rules tab.
  2. Read the rules. Look for allow read, write: if true, ".read": true, ".write": true, or a rule that checks only request.auth != null on private data.
  3. Check the top of the Firebase console for a banner about insecure or expiring rules; Firebase shows one when it detects open rules.
  4. A bad result is any if true rule on a live project, or a banner warning about your rules.

Record ids accepted without an ownership check

  1. Create two accounts in your app and add one record, such as an order or a note, in each.
  2. In account A, open a record and copy its address from the browser bar, or open developer tools (right-click, Inspect, then Network) and copy the request that loads it.
  3. Sign in as account B in a private window and paste that address, or use Copy as cURL on the request and run it with account B's cookies.
  4. Try the same with an id one higher or lower than your own, and with the edit and delete actions.

A bad result is account A's record appearing for account B, or an edit or delete going through.

Firebase pre-launch checklist

27 checks, in the order we run them. Usable without buying anything.

Self-check tool

Answer questions about your setup and get the patterns that apply, ordered by severity. Runs in your browser; nothing is sent.

Run the self-check

Packages for Firebase projects

Pre-launch check

Start here

For founders about to let real users in.

$490

Report in 48 hours
  • Keys and secrets in the browser or repo
  • Who can read and change whose data
  • Login, roles and admin routes
  • Errors, retries and rate limits
  • Debug mode, headers, deploy path

What you receive

Security sweep

For anyone who wants the three riskiest areas checked fast.

$290

Report in 24 hours
  • API keys and secrets in the bundle
  • Row-level rules on every table
  • Cross-user data reads
  • Admin and hidden routes
  • Client-only permission checks

What you receive

All packages and prices. Every report includes a re-check after your fixes.

Questions about Firebase

firebase rules public database

A rule that reads allow read, write: if true, or a Realtime Database rule with .read and .write set to true, lets anyone with the project id read and overwrite data. Open the Rules tab, look for those lines, and use the Rules Playground with an unauthenticated request to confirm what is reachable.

firebase security audit

We read every rule set, try reads and writes as an anonymous client and as two signed-in users, check whether App Check is enforced, and look for keys and config in the bundle. Findings name the rule path to change.

is the firebase api key secret

Firebase's docs say the API key identifies the project and does not grant access by itself; rules, IAM and App Check do. Restricting the key in Google Cloud is still good practice, but the rules are what you test.