Platform
Firebase breaks
Firebase breaks: allow read, write: if true, any signed-in user, and a child rule that cannot revoke a parent. Simulator checks are for your own project.
12 cards are tagged Firebase. Symptoms in this set: Auth, Exposed data, Publishing, Secrets, Over-open rules. Open a card for the root cause, the fix prompt, and the self-check. The check is only for an app you own.
Auth
"FirebaseError: Missing or insufficient permissions" after your Firestore app worked for 30 days
This applies when a Cloud Firestore read or write from a client fails with the message FirebaseError: Missing or insufficient permissions, code permission-denied. If this project does not use Cloud Firestore, this card does not apply. Firebase is the platform tag because the failure is in that project's security rules and client SDK. The pages on this card describe the Firebase CLI's Firestore init template, how queries have to match rules, and when Firebase Auth has a current user. They do not describe a bug in one generator, so the same failure happens on any Cloud Firestore app, including an app an AI coding tool generated. This card does not say Lovable or Bolt write that template. The Firestore JavaScript reference lists the code permission-denied with the description "The caller does not have permission to execute the specified operation." firebase-js-sdk issue 10037, opened June 4, 2026, and closed, prints FirebaseError: Missing or insufficient permissions (code: permission-denied). The report says the error only occurs on page refresh when a session is being restored. This card cites that issue for that text and that context. It does not cite the issue as proof of a bug, and it does not cite the issue as the reason a query ran before Auth was ready. The get-started page for Cloud Firestore Security Rules says every database request from a Cloud Firestore mobile or web client library is evaluated against your security rules before reading or writing any data, and that if the rules deny access to any of the specified document paths, the entire request fails. One cause is the CLI template at templates/init/firestore/firestore.rules. On match /{document=**} it allows read and write while request.time is less than timestamp.date({{IN_30_DAYS}}). The comment in that file says this rule allows anyone with your database reference to view, edit, and delete all data in your database, that it is configured to expire after 30 days because it leaves your app open to attackers, and that at that time all client requests to your database will be denied until you update your rules. src/init/features/firestore/rules.ts replaces {{IN_30_DAYS}} with the year, month, and day from thirtyDaysFromNow(). src/utils.ts defines thirtyDaysFromNow() as Date.now() plus 30 * 24 * 60 * 60 * 1000. The replacement string is getFullYear(), getMonth() + 1, and getDate(), so the month number in the file is 1 through 12. When firebase init firestore runs with a project id and the console already has a ruleset, rules.ts downloads that ruleset instead of leaving the template in place. A second cause is the page "Securely query data". It says security rules are not filters and queries are all or nothing. If a query could potentially return documents the client does not have permission to read, the entire request fails. Its example rule, request.auth != null && request.auth.uid == resource.data.author, rejects db.collection("stories").get() even when the current user is the author of every story. The query it shows succeeding is where("author", "==", user.uid), with user from firebase.auth().currentUser. The same page says a retrieval by document id is evaluated against that document's actual properties. A third cause is a client request that runs before Auth has a signed-in user. The manage-users page says currentUser is null when nobody is signed in, and that currentUser might also be null because the auth object has not finished initializing. It says an onAuthStateChanged observer avoids that intermediate state. The Auth reference says authStateReady() resolves when the initial auth state is settled, and that the current user might then be a valid user or null if the user signed out. The rules-and-auth page says the auth variable is null when the user requesting access is not signed in. The content-owner rules compare request.auth.uid to the owner field, so a request that still has no user is not an owner request. Moving the date forward keeps the template allow, which that file's comment says leaves the app open to attackers. allow read, write: if true is the open-access example on the insecure-rules page, and that page says never use it in production. A rule whose only check is request.auth != null, or request.auth.uid != null, is the any-authenticated-user example, and that page says to confirm you want any logged-in user to have that access. The catalog card "Firebase rules allow every read and write" is the if true case. The catalog card "Any signed-in Firebase user can read the whole database" is the signed-in-only case. The catalog card "A deeper Firebase rule cannot take access away" is Realtime Database cascading rules, which this card does not cover. The longer guide linked from this page is "Firebase security rules allow read, write if true: check your own project".
Exposed data
A Flutter or Firestore app still trusts the compromised eMudhra certificates after the operating system update
This applies when an installed Flutter app, or a mobile or desktop app that uses Cloud Firestore, still trusts the compromised eMudhra certificates after the operating system update. If this project is a website that uses the Firebase JavaScript SDK, the guide's affected list does not name it, and this card does not say that site is affected or unaffected. Firebase's guide "Updates required to remediate the eMudhra certificate compromise" prints "Last updated 2026-11-19 UTC." It says: "On October 19, 2026, Google became aware that the private keys for several intermediate certificate authority (CA) certificates issued by a third-party certificate authority (eMudhra) were compromised and subsequently revoked." It says: "While operating systems and web browsers have distributed updates to distrust these intermediate certificates in system trust stores, the impacted products listed on this page validate Transport Layer Security (TLS) connections using an embedded root certificate bundle compiled into the binary." It says attackers who possess the compromised certificate authority keys can forge legitimate-looking HTTPS certificates. It says affected apps fail to detect the revocation and continue trusting the fake credentials, so attackers on the network can conduct man-in-the-middle attacks to impersonate legitimate backend servers, including Cloud Firestore and any HTTPS endpoints contacted by affected apps or the App Distribution Gradle plugin. It says that means attackers can secretly intercept, steal, or tamper with sensitive user data. This card does not describe how that is done. The page does not say an attack was observed, and it does not give a count. The affected list is: Flutter apps, regardless of target platform or product; native Apple platform apps that use Cloud Firestore; Unity apps that target Apple or desktop platforms and use Cloud Firestore; C++ apps that target Apple or desktop platforms and use Cloud Firestore; native Android apps that use the Firebase App Distribution Gradle plugin. The page says other community-supported platforms are affected as well, for example React Native apps that target Apple platforms and use Cloud Firestore. It does not print a React Native package version. For Flutter or Dart apps that target Android, Windows, or Linux, the page says dart:io validates TLS certificate chains using its own compiled-in BoringSSL engine and does not read OS intermediate certificate blocklists. It says to upgrade to Dart 3.13.7 or later and Flutter 3.47.8 or later, with Dart 3.13.7 or later, then rebuild and redeploy those apps or binaries. It says operating system updates alone don't remediate previously installed application builds, because the TLS certificate validation logic is compiled into the application binary. A separate section is for a Flutter app that targets Apple or Windows platforms and uses Cloud Firestore. That table says cloud_firestore 7.0.0 and earlier is affected, excluding 6.10.1 and 6.10.2. The recommended fix is cloud_firestore 7.1.0, FlutterFire BoM 5.1.0 or later. The backport is 6.10.1 for iOS and macOS, FlutterFire BoM 4.20.1, and 6.10.2 for Windows, FlutterFire BoM 4.20.2. The Flutter release notes for BoM 5.1.0, dated October 22, 2026, list cloud_firestore 7.1.0. Under Cloud Firestore they say: "(iOS): Security Update: Removed root certificates associated with compromised eMudhra intermediate CAs from the embedded trust store." That line is labeled iOS. The guide's table header for the plugin is iOS, macOS, or Windows. This card does not say the release notes repeat that sentence for macOS or Windows. A read of that release notes page on November 25, 2026 did not show a BoM 4.20.1 or 4.20.2 heading, or cloud_firestore 6.10.1 or 6.10.2. Those backport versions are the ones the guide's table prints. The same BoM 5.1.0 table lists native Apple 12.19.3 and native Apple 13.1.1. The guide's FirebaseFirestore table says 13.1.0 and earlier is affected, excluding 12.19.3, and the versions with the fix are 13.1.1 or later, recommended, or 12.19.3. The firebase-ios-sdk 13.2.0 release was published 2026-11-13. Its notes, compared with 13.1.0, include: "fix(firestore): removed compromised eMudhra intermediate CA root certificates from embedded trust store." 13.2.0 is inside the guide's "13.1.1 or later." This card does not say 13.2.0 is the minimum, and it does not say that line is absent from 13.1.1. The guide's CocoaPods note says the affected versions are 12.19.2 and earlier, and to update to 12.19.3, and that Firebase 12 is the final major version published to CocoaPods. The Unity table says firebase-unity-sdk 14.0.0 and earlier is affected, excluding 13.17.1, for iOS or desktop (macOS, Windows, Linux), and the fix is 14.1.0 or later, or 13.17.1. The C++ table says firebase_cpp_sdk 14.0.0 and earlier is affected, excluding 13.13.1, for the same platforms, and the fix is 14.1.0 or later, or 13.13.1. The App Distribution Gradle plugin table says com.google.firebase.appdistribution 5.3.0 and earlier is affected, excluding 4.2.1 and 3.2.1, and the fix is 5.3.1 or higher, or 4.2.1 on the 4.x line, or 3.2.1 on the 3.x line. That section says redeploying the app is not required. The page's high-level actions for the other affected apps are to update the SDKs or plugins, republish, and encourage end users to update. It says the Cloud Firestore backend was not affected, and neither was any other part of the Cloud Firestore product. It says the App Distribution backend was not affected, and neither was any other part of the App Distribution product. The guide points to a Google Security Blog post and a Dart SDK security advisory. This card does not quote those pages. This catalog has an earlier card, dated 2026-10-31, on the same guide. This card is the guide as it read on 2026-11-25.
Publishing
Your Firebase AI voice feature stops working when the preview speech model shuts down on November 17
The rest of the app still loads. The voice feature stops when the preview speech model shuts down. The code that calls it still compiles. This applies to an app that calls Firebase AI Logic with gemini-3.1-flash-tts-preview. If the app does not call that model, this card does not apply. The Firebase release notes for November 11, 2026 say Firebase AI Logic supports the latest stable Gemini TTS models gemini-3.8-flash-tts and gemini-3.8-flash-lite-tts for text-to-speech, through the Gemini Developer API or the Agent Platform Gemini API (formerly Vertex AI). Those notes say: "The preview model gemini-3.1-flash-tts-preview will shut down on November 17, 2026. If your app uses this legacy model, see the migration guide to update your model name, prompt format, and audio handling before that date." The Firebase docs page "Generate speech (TTS)", section "Migrate from gemini-3.1-flash-tts-preview", says gemini-3.1-flash-tts-preview will shut down on November 17, 2026. Migrate to gemini-3.8-flash-tts or gemini-3.8-flash-lite-tts before that date to avoid service disruption. Both new models use the same request structure. Those notes say to update the model name, the prompt format, and the audio handling before that date. That section says the new models keep each TextPart's text as the verbatim spoken transcript, and style goes in SpeechMetadata style on that part. The migration checklist on that page says to remove those prefixes and blocks, including a line such as "Say cheerfully:", "so the model doesn't read them aloud". The same section says the legacy model ignored system instructions, temperature, top-P, and top-K, and the new models reject them with a 400 INVALID_ARGUMENT error. Those pages describe the shutdown as service disruption.
Publishing
Your Firebase AI feature returns a 400 after you switch to Gemini 4
The rest of the app still loads. The AI feature returns a 400. The code that calls it still compiles. This applies to an app that calls Firebase AI Logic, including an app built in Lovable, Bolt, Cursor, Replit, or v0 when that app uses Firebase AI Logic. If the app does not call Firebase AI Logic, this card does not apply. Firebase's release notes for November 10, 2026 say Firebase AI Logic supports the Gemini stable model gemini-4-carbon, through the Gemini Developer API or the Agent Platform Gemini API (formerly Vertex AI). The November 12, 2026 notes say Firebase AI Logic supports gemini-4-hydrogen, through the Gemini Developer API (free tier) or the Agent Platform Gemini API (formerly Vertex AI). An AI coding tool asked to upgrade to the newest Gemini usually changes only the model name string and leaves the old generation settings in the call. The settings this card means are thinkingBudget, a thinking level of MINIMAL, frequencyPenalty, presencePenalty, candidateCount, and a prefilled model turn. The Firebase docs page "Thinking" says: "The Gemini 2.5 models use thinking budget instead of thinking level. The general-use Gemini 3.x models and the latest Gemini Nano Banana models support thinking budget for backwards-compatibility. However, the Gemini 4.x models do not support thinking budget (and will return a 400 error if it's set)." The November 10 notes say that on gemini-4-carbon, setting the thinking level to MINIMAL is not supported and the request fails with a 400 error, and that using thinkingBudget is not supported. There is no backwards-compatibility. The request fails with a 400 error. Those notes also say frequency penalty, presence penalty, and candidate count make the request fail with a 400 error, and that prefilled model turns are not supported. If the last non-empty turn in the request is a model turn, the request fails with a 400 error. The November 12 notes say that on gemini-4-hydrogen, MINIMAL is not supported and the request fails with a 400 error, and that unlike gemini-3.8-flash, thinkingBudget is not supported. There is no backwards-compatibility. The request fails with a 400 error. Those notes say frequencyPenalty, presencePenalty, and candidateCount fail with a 400 error. The November 12 notes do not state the prefilled-model-turn rule. The other trap is on gemini-4-hydrogen. Those notes say that if you upgrade from gemini-3.8-flash, or from another Gemini 3.x model, and you remove the old setting without choosing a level, the default thinking level is HIGH. That default changed from MEDIUM on gemini-3.8-flash. Firebase says that may increase latency and token usage unless you explicitly set thinkingLevel to MEDIUM or LOW.
Publishing
Your app's Gemini 2.5 calls switch models on December 1
The AI feature still answers. The model name in the code has not changed. Google's Gemini API deprecations page says gemini-2.5-pro is deprecated and is no longer available to select in Google AI Studio, and that API access is limited to existing users who have actively used it. Effective December 1, 2026, all API requests to gemini-2.5-pro automatically route to gemini-3.8-flash and are billed at Gemini 3.8 Flash rates. The same page says gemini-2.5-flash is deprecated and is no longer available to select in Google AI Studio. Effective December 1, 2026, all API requests to gemini-2.5-flash automatically route to gemini-3.5-flash-lite and are billed at Gemini 3.5 Flash-Lite rates. gemini-2.5-flash-lite is not deprecated and remains available through the API until further notice. After that date the feature can keep answering from a different model, billed at the newer model's rates, or it can start failing with HTTP 400. Firebase's November 2, 2026 release notes say that when a gemini-2.5-pro request is routed to gemini-3.8-flash, frequencyPenalty, presencePenalty, or candidateCount fails with a 400 error. A last non-empty turn that is a model turn fails with a 400. Setting the thinking level to MINIMAL on a request routed to gemini-3.8-flash fails with a 400. The migration guide for Gemini 3.6 Flash and 3.5 Flash-Lite says the same about that model turn: if the last non-empty turn in the request is a model turn, the API returns a 400 error. That guide says the default thinking level for gemini-3.5-flash-lite is minimal. For autonomous subagents with tool calls, code execution, or multi-step reasoning, set thinking_level to medium or high to prevent premature tool termination. For high-volume extraction or classification, leave minimal.
Auth
Your Firebase AI Logic calls are blocked without an App Check token
The rest of the app still loads. Sign-in works. The Gemini call does not. Firebase's AI Logic FAQ and the App Check guide say that starting November 2, 2026, Firebase will automatically enforce App Check for Firebase AI Logic in a project where it is not already enforced. A request with no valid App Check token is unverified, and the same pages say it will be blocked. That includes a released build that never initialized App Check, and it includes localhost, which the debug-provider guide says does not qualify as a valid device. The October 27, 2026 Firebase release notes are where the delay control was added. On the Firebase AI Logic row under Security > App Check > APIs, the Enforces date can be moved, and the last date those docs allow is January 21, 2027. Moving that date does not put a token in an old build, and the same docs say the Gemini API stays open to abuse until enforcement is on. Firebase's error-code page documents two 403 PERMISSION_DENIED messages for projects that are not enforced yet. One says To access this model, you must enforce Firebase App Check, when the request has no valid token and the model is one Firebase describes as common for malicious actors to abuse. The other says Firebase AI Logic has been deactivated in this project, when AI Logic is enabled and the project has no recent usage.
Exposed data
Your Flutter or Firestore mobile app still trusts the compromised eMudhra certificates
Nothing looks broken. The app logs in, reads and writes Firestore, and passes review. But it was built before late October 2026, when Google, Firebase, and the Dart team shipped fixes for eight compromised eMudhra intermediate certificate authorities. Chrome and Android pushed blocklists to phones, so many builders assume they are covered. Flutter apps on Android, Windows, and Linux, and apps that use the Cloud Firestore SDK on iPhone, Mac, Unity, or C++, check HTTPS certificates with a trust list compiled into the app itself. Phone and browser updates do not change that list. Only a rebuilt, republished app does, and users stay exposed until they install it.
Secrets
A Gemini key ships in the browser bundle and someone else runs up the bill
The AI feature works in the preview and in production. Then a Google Cloud bill shows hundreds or thousands of dollars of Gemini calls your users never made, or the feature stops with Your API key was reported as leaked. The key sits in plain text in the shipped JavaScript, usually as VITE_GEMINI_API_KEY or a Vite define of process.env.GEMINI_API_KEY.
Over-open rules
Firebase rules trust an email domain without verifying the address
Domain checks on request.auth.email look locked to your company. Anyone who signs up with an unconfirmed address on that domain still passes.
Over-open rules
Firebase rules allow every read and write
The app was created in Firebase Test mode, or the rules say allow read, write: if true. Anyone who knows the project can read and overwrite the data.
Over-open rules
Any signed-in Firebase user can read the whole database
Signed-out visitors are blocked. Any account, including one you just created, can read and write every document.
Over-open rules
A deeper Firebase rule cannot take access away
A child path sets ".read": false, and clients can still read it.