low · M3 · MASVS-AUTH-1 · PTKD-LIVE-FIREBASE-ANON-AUTH

    Firebase anonymous sign-in is enabled

    Anyone can mint a Firebase ID token for the project, so security rules that only check `request.auth != null` protect nothing.

    How it is exploited

    The attacker calls accounts:signUp with only the web API key, receives an ID token, and reads every path whose rule is `allow read: if request.auth != null`.

    Why it matters

    Rules that look locked are open to anyone.

    How to fix it

    1. Search firestore.rules / storage.rules / database.rules.json for `request.auth != null` used alone.
    2. Check ownership (request.auth.uid == resource.data.owner) instead.
    3. Disable anonymous sign-in if unused.

    Does your app have this?

    PTKD checks your build or your source project for PTKD-LIVE-FIREBASE-ANON-AUTH and every other check in this knowledge base.

    Scan your app

    References

    Related checks (M3)