Bug Hunting 101: The Firebase Misconfig That Earned Me a Bounty
An Android app's decompiled code revealed a Firebase Realtime Database URL whose security rules allowed anyone to read and write without authentication. An attacker could dump private user data or inject and tamper with records.
Published on medium.com
Hey folks, welcome to another article, well this is my first bounty writeup. Today, I’m going to share something really interesting, where i found a critical security bug in an app that was exposing sensitive user data because of firebase misconfiguration.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Firebase Realtime Database security rules were left with read and write set to true, so no authentication was required.
Impact
Anyone could read private user data and could inject, delete or tamper with records, though the author notes Firebase now warns developers about open rules, making such findings rarer.
What the attacker needed
Target has an Android app; APK can be obtained; Firebase rules left open
The fix
The database rules should be tightened so that read and write require authentication and are limited to what each user needs.
How it was found
- Download the target Android app's APK file.
- Open the APK in the Jadx decompiler.
- Browse to the app's string resources file.
- Search that file for the Firebase database hostname to get the database URL.
- Append the JSON suffix to the database URL to check whether it returns data without a login.
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 write-up has not been written yet. The Original tab links to the source.
Firebase is a Google service that apps use to store data in the cloud. Its database has access rules, and if those rules are left open, anyone who knows the database address can read or change everything inside it without logging in. Here the app's address was found by unpacking the Android app file.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.