medium · M9 · MASVS-STORAGE-2 · PTKD-PRIV-FIREBASE
Firebase Realtime Database endpoint embedded
A *.firebaseio.com endpoint is present. If the database rules are not locked down, the data is world-readable/writable.
How it is exploited
An embedded firebaseio.com endpoint invites the classic misconfiguration check: append /.json and see if the database answers without auth. Openly readable or writable Firebase RTDBs are found by scanners within hours.
Why it matters
If rules are weak, the entire realtime database (user records, chat, tokens) is publicly readable or writable.
How to fix it
- Open the Firebase console and lock database rules: no public read/write; require auth and per-user paths.
- Test the endpoint yourself: GET https://<db>.firebaseio.com/.json must return "permission denied".
- Treat the URL itself as public knowledge; security must live in the rules, not obscurity.
Does your app have this?
PTKD checks your build or your source project for PTKD-PRIV-FIREBASE and every other check in this knowledge base.
Scan your appReferences
Related checks (M9)
- Android file or preferences created world-readable or world-writable
- Public Supabase bucket can be listed by anyone
- Public Supabase storage bucket (heuristic)
- Sensitive data written to external storage
- Sensitive data written to the log
- Secret written to device storage
- Tokens or passwords stored in plain app preferences
- Keychain item accessible while locked