Security

    Does Apple check for hardcoded Firebase keys in 2026?

    Decompiled iOS IPA showing GoogleService-Info.plist with a visible Firebase API key, next to an App Store Connect submission status screen marked Waiting For Review

    The reader who lands here is shipping a Firebase-backed iOS app in 2026, can see the Firebase API key sitting in plain text inside GoogleService-Info.plist, and wants a direct answer about whether App Review will reject the binary, fail the upload, or otherwise flag the value at submission time.

    Short answer

    Apple's App Store review in 2026 does not scan iOS binaries for hardcoded Firebase API keys, project IDs, or database endpoint URLs. Per Apple's App Review Guidelines, the team checks policy compliance, not the bundle's string table. Per Firebase's documentation on API keys, keys restricted to Firebase services do not need to be treated as secrets, and Google says it is safe to include them in code or configuration files. The risk that matters is what happens at that endpoint when a request arrives without authentication.

    What you should know

    • Apple does not publish a Firebase key scanner. App Review focuses on policy, privacy disclosures, and runtime behavior, not on extracting strings from your binary.
    • The iOS Firebase API key is configuration. Google's own documentation treats it as a non-secret identifier paired with server-side Security Rules and App Check.
    • The leak path is the server, not the binary. A visible project ID combined with allow read: if true is a public dataset waiting for a curl call.
    • Some credentials must never ship inside the IPA. Firebase Admin SDK service account JSON, FCM legacy Server Keys, and Gemini Developer API keys are real secrets.
    • OWASP MASWE-0005 is the canonical reference. Per the OWASP MAS Project, API keys hardcoded in the app package map to a defined weakness category, separate from app store policy.
    • App Check is the second layer. DeviceCheck and App Attest let Firebase reject requests from clients that are not your real binary.

    What does Apple's automated review actually inspect?

    The automated layer of App Review focuses on items that block a build from running on a user's device or that violate published policy. Per the published App Store Review Guidelines, section 1.6 covers data protection in the abstract, section 2.5 covers technical implementation (private API usage, executable code), and section 5.1 covers privacy and the App Tracking Transparency framework. None of these sections names hardcoded backend credentials as a rejection trigger.

    The automated checks reported by developers across the queue concentrate on private API usage (ITMS-90338), missing API declarations (ITMS-91053), invalid privacy manifest paths (ITMS-91056), and code signing problems (ITMS-90035). Apple has never published a check that runs strings against the binary, regexes for AIza prefixes, and emails a developer about an exposed key. If the check existed, the ITMS code would have been catalogued by now.

    The human reviewer who picks up the build later opens the app on a device, exercises the user flow, confirms in-app purchase mechanics, and verifies the privacy disclosure against the runtime behavior. The reviewer does not extract the IPA and run regex against the Mach-O executable. That work is left to whichever scanner the developer (or attacker) chooses to run.

    Is the Firebase iOS API key actually a secret?

    Per Firebase's documentation on API keys, the answer is no, with one important exception. The exact phrasing on the page is that API keys restricted to Firebase services do not need to be treated as secrets, and that it is safe to include them in your code or configuration files. The key identifies which Firebase project the client talks to. It does not grant any privilege beyond identification.

    The exception is the Gemini Developer API key. The same page states that a Gemini key should never be included in your code or configuration files, and that it must be protected from public exposure. If a developer copies a Generative AI key into the iOS bundle because a tutorial asked for it, that key is a real secret, and the binary now ships a credential that can be billed against.

    The framing moves the threat model. With the Firebase key, project ID, and storage bucket URL all visible inside the IPA, the only protection that remains is server-side: Firebase Security Rules, Firebase App Check, and Google Cloud API key restrictions tied to your iOS bundle identifier.

    What is actually at risk when the Firebase key is exposed?

    Three failure paths, each producing a different kind of incident.

    The first is permissive Security Rules. A Firestore or Realtime Database rule like allow read, write: if true makes every document reachable by anyone with the project ID. The Cybernews 2024 analysis of Firebase exposure reported over 51,000 Firebase database links pulled out of iOS apps, with 2,218 instances misconfigured to leak roughly 19.8 million records totaling around 33 GB of user data. The endpoint visibility did not cause the leak. The rule that accepted unauthenticated reads did.

    The second is missing App Check. Firebase App Check uses Apple's App Attest and DeviceCheck to prove that requests come from a real instance of the app rather than a script running on a laptop. Enforcement is a per-service toggle (Firestore, Storage, Realtime Database, Cloud Functions) and is off by default. Without it, anyone holding the project ID can run the Firebase client SDK from a server and call your project.

    The third is wrong credentials ending up in the IPA in the first place. Firebase Admin SDK service account JSON files grant full project access. FCM legacy Server Keys can mint push notifications under the project name. Either, pasted into the iOS bundle, exposes the project to abuse that the App Store check has no visibility into.

    How easily can an attacker pull keys out of an IPA?

    A decrypted IPA is a ZIP archive. The Firebase configuration sits at Payload/<App>.app/GoogleService-Info.plist. The full extraction looks like this:

    unzip MyApp.ipa
    cd Payload/MyApp.app
    plutil -p GoogleService-Info.plist
    strings MyApp | grep -E "AIza[0-9A-Za-z_-]{35}"
    strings MyApp | grep -E "firebaseio\.com|firestore\.googleapis|appspot\.com"
    

    The plist is plaintext XML once plutil -p converts it. Firebase project domains follow predictable suffixes (*.firebaseio.com, *.firestore.googleapis.com, *.appspot.com). Google API keys carry the AIza prefix and a 35-character body. Open-source tooling such as the OpenFirebase scanner automates the extraction and then probes the discovered endpoints to flag unauthenticated reads and writes against Firestore, Realtime Database, Storage, and Cloud Functions. The bottleneck for an attacker is triage, not discovery.

    Which controls actually defend an exposed Firebase project?

    The defense lives on Google's side, applied per service, in this order:

    ControlWhat it enforcesWhat you have to verify
    Firebase Security RulesPer-path read and write decisions based on request.auth and field conditionsRules are unit tested against the unauthenticated path, not only the happy-path user
    Firebase App CheckAttests that requests originate from your real binary via App Attest or DeviceCheckEnforcement is enabled per service in the Firebase Console, including Cloud Functions
    Google Cloud API key restrictionsBinds the iOS API key to your bundle identifier and to a specific allowlist of Firebase APIsThe bundle ID matches your production target, not just the dev or TestFlight variant
    Server-side proxy for sensitive callsMoves any non-Firebase API (Stripe, OpenAI, Gemini) behind your own backendThe proxy authenticates the user and enforces a per-route rate limit

    Rules decide who can read what. App Check decides whether the caller is a real instance of your app. API key restrictions decide which Google services the key can call at all. Per the OWASP MAS Project, MASWE-0005 covers the hardcoded keys weakness directly, and MASVS-AUTH covers the authentication and authorization controls that turn an exposed identifier into a non-event. For builders shipping iOS apps from AI-coded toolchains, an automated read of the compiled IPA against the same OWASP MAS controls is one way to catch a missing App Check enforcement or a stray Admin SDK file before submission. PTKD.com (https://ptkd.com) is one of the platforms focused on that pre-submission scan, useful when the toolchain (FlutterFlow, Bubble, Capacitor wrappers around Replit Agent or Lovable exports) does not surface its bundled SDKs in a readable way.

    What to watch out for

    Two patterns surface repeatedly when developers audit Firebase iOS builds. The first is conflating a clean App Store Connect upload with a safe Firebase project. The upload check runs against Apple's rules (privacy manifest, private API usage, code signing). It does not run against the Firebase project's Security Rules. A build can ship and still expose every document in Firestore, because the rules deploy is a separate workflow that lives in the Firebase Console.

    The second is treating App Check as a single toggle. App Check enforcement is per service. Enabling it on Firestore while leaving Cloud Storage open means the attacker pivots to the bucket and reaches the same data through a different door. The Firebase Console shows enforcement status per service on the App Check tab. Reading that page after every release catches the gap.

    Two myths to reject directly. The Firebase API key in GoogleService-Info.plist is not a token, not a session credential, and not the thing standing between a stranger and your data. And declaring the Firebase SDK in your Privacy Manifest does not change anything about backend security. The manifest documents which APIs the binary calls, not what your server allows.

    Key takeaways

    • Apple's App Store review in 2026 does not extract or audit hardcoded Firebase API keys, project IDs, or endpoint URLs inside iOS binaries. The check sits outside Apple's scope by design.
    • Firebase API keys restricted to Firebase services are not secrets. The keys to keep out of the IPA are Admin SDK service account JSON, FCM Server Keys, and Generative AI keys such as Gemini Developer.
    • The exposure that produces real incidents is the server side: permissive Security Rules and missing App Check enforcement. Both are configured outside the binary, on the Firebase Console.
    • The OWASP MAS Project frames hardcoded keys as MASWE-0005, separate from app store policy. Treating the two checks (Apple policy review, MAS security review) as independent prevents the false sense of safety that comes from a clean App Store Connect upload.
    • For teams without an internal mobile security reviewer, an automated read of a compiled IPA against the OWASP MAS controls before submission is one way to surface a missing App Check enforcement, a stray service account file, or an unrestricted Google Cloud API key. PTKD.com (https://ptkd.com) is one of the platforms set up for that pre-submission scan, particularly for AI-coded and no-code iOS builds.
    • #app-store
    • #ios
    • #firebase
    • #hardcoded-keys
    • #security
    • #app-check
    • #owasp-masvs

    Frequently asked questions

    Will Apple reject my iOS build for shipping the Firebase API key in GoogleService-Info.plist?
    No documented case exists of Apple rejecting a build specifically for shipping the Firebase iOS API key in GoogleService-Info.plist. Per Firebase's own documentation, the key is non-secret configuration. App Review focuses on policy compliance (privacy disclosures, executable code rules, demo accounts), not on extracting strings from your binary. The Firebase project ID, storage bucket URL, and the AIza key all sit in the bundle by design.
    What is MASWE-0005 and how does it apply to Firebase keys?
    MASWE-0005 is the OWASP MAS weakness entry for API Keys Hardcoded in the App Package. It applies to any credential pasted into the binary that grants backend access. For Firebase, MASWE-0005 applies to Admin SDK service account files and unrestricted Google API keys (Maps, Gemini, Cloud Vision). It does not apply to the standard Firebase API key restricted to Firebase services, which Google ships visibly by design.
    How do I tell if my Firebase API key is restricted to Firebase services only?
    Open the Google Cloud Console, go to APIs and Services, then Credentials. Click the iOS API key. Under API restrictions, confirm the key is set to Restrict key and the allowed list contains only Firebase services (Firebase Installations API, Identity Toolkit API, Firebase Cloud Messaging API, Firebase Realtime Database, Firestore). If Don't restrict key is selected, the same key can call Maps, Translate, and any other Google API enabled on the project.
    Does App Check work with a Firebase project that uses anonymous auth?
    Yes. App Check and Firebase Authentication run on independent layers. App Check attests that the request originated from a real instance of your binary. Anonymous auth still issues a Firebase ID token to the client. Security Rules then read both request.auth (from Authentication) and the App Check token. The two together produce a request that App Check enforcement accepts and the rules can evaluate against the anonymous user record.
    What credentials should never appear inside an iOS Firebase build?
    Three categories. Firebase Admin SDK service account JSON files (serviceAccountKey.json), which grant project admin access. Firebase Cloud Messaging legacy Server Keys, which can send push notifications under your project name. And any Gemini Developer API key, which Google explicitly says must not be included in code or configuration files. All three carry server-side privilege that the iOS Firebase API key does not.

    Keep reading

    Scan your app in minutes

    Upload an APK, AAB, or IPA. PTKD returns an OWASP-aligned report with copy-paste fixes.

    Try PTKD free