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
- Search firestore.rules / storage.rules / database.rules.json for `request.auth != null` used alone.
- Check ownership (request.auth.uid == resource.data.owner) instead.
- 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 appReferences
Related checks (M3)
- Permissive CORS with credentials
- State-changing request succeeded without authentication
- Weak JWT observed on the wire
- Biometric authentication not bound to a cryptographic key
- Premium access is stored on the phone and trusted (heuristic)
- Firebase rules trust an email address nobody verified
- Firebase security rules open to everyone
- Users can make themselves admin or premium in Firestore