Skip to content
Misconfiguration Disclosed report Beginner

Firebase Firestore insecure database

The Android app exposed a Firebase project name that allowed unauthenticated access to a Firestore database. An attacker could use the Firestore REST API to add documents to the database.

emmano Follow

Originally disclosed on HackerOne

  • Disclosed after 3 months

Summary:

The app is exposing a firebase database url that has no read/write protections.

Steps To Reproduce:

  1. Decompile the Android app
  2. Do a string search for firebase_database
  3. Use the project name (i.e. msdict-dev) in combination with the Firestore REST API to modify the database.

Supporting Material/References:

Via decompilation an attacker can get the project name for a Firebase database. Then they can use the Firestore REST API to modify the DB. I was able to add a new document to the DB with the following script.

curl https://firestore.googleapis.com/v1/projects/msdict-dev/databases/%28default%29/documents/test -H 'Content-Type: application/json' -d '{ "fields": { "title": { "stringValue": "TEST" }} }'

to view the document that was added just visit:

https://firestore.googleapis.com/v1/projects/msdict-dev/databases/%28default%29/documents/test

Impact

An attacker has access to an insecure database.

The original report as published on HackerOne, by emmano. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could add documents to the database.

What the attacker needed

Android app available for download; No authentication required

How it was found

  1. Decompile the Android app
  2. Search the decompiled code for the string firebase_database
  3. Use the discovered project name with the Firestore REST API to modify the database

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Firebase is a cloud database service. If its security rules are left open, anyone who knows the project name can read or write data without logging in. Here, the project name was hidden inside the Android app, so an attacker could extract it and then use a public web API to add records.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More from MobiSystems Ltd.

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.