Skip to content
Misconfiguration Disclosed report Beginner

Firebase Database Takeover in https://pulseradio.mtn.co.ug/

A Firebase configuration file exposed the database URL and API key, and the database allowed unauthenticated writes. An attacker could upload arbitrary data to the Firebase database.

shuvam321 Follow

Originally disclosed on HackerOne

Critical 10.0 View original
  • Triaged in 20 days
  • Fixed in 10 months
  • Disclosed after 11 months

Summary:

During my test , in one of the subdomain of mtn.co.ug I found firebase configuration disclosed in the source code along with apiKey and database URL .

Exploiting this vulnerability attacker is able to upload malicious data in the firebase account of pulseradio.mtn.co.ug and see database over there .

Steps To Reproduce:

POC : https://mtn-pulse-uganda.firebaseio.com/poc.json

  1. Go to URL below and view the source code of website .

view-source:https://pulseradio.mtn.co.ug/wp-content/themes/mtn-pulse-reskin/zero-rate/firebase-config.js

There you will see following sensitive data .

$(document).ready(function() { // Your web app's Firebase configuration var firebaseConfig = { apiKey: "AIzaSyCRrABG3_Sc7xHar70hFyjHjEOJ071rbJ4", authDomain: "mtn-pulse-uganda.firebaseapp.com", databaseURL: "https://mtn-pulse-uganda.firebaseio.com", projectId: "mtn-pulse-uganda", storageBucket: "mtn-pulse-uganda.appspot.com", messagingSenderId: "242450689592", appId: "1:242450689592:web:bdd1173378d94d733800cd", measurementId: "G-KHPT64LJ5L" };

  1. Now lets upload some data in firebase database . Send the following curl request . Your data will be uploaded to firebase .

curl "https://mtn-pulse-uganda.firebaseio.com/poc1.json" -XPUT -d '{"attacker":"maliciousdata"}'

  1. Your data will be uploaded to https://mtn-pulse-uganda.firebaseio.com/poc1.json

References: There are guidelines available by Firebase to resolve the insecurities and misconfiguration, please follow this link: https://firebase.google.com/docs/database/security/resolve-insecurities

Impact

This is quite serious because by using this database attacker can use this for malicious purposes and also an attacker can track this database if mtn uses it for future perspective and at that time it will be much easier for the attacker to steal the data from this repository and later it will harm the reputation of the mtn.co.ug .

So please immediately change the rule of the database to private so that nobody can able to access it outside.

Attachments

Screenshot_from_2022-01-12_04-56-44.png
Screenshot_from_2022-01-12_04-56-44.png From the original on HackerOne

The original report as published on HackerOne, by shuvam321. 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

Root cause

Likely the Firebase Realtime Database security rules were set to allow public write access, and the configuration including the database URL was exposed in client-side JavaScript.

Impact

An attacker could write arbitrary data to the Firebase database, which could be used for malicious purposes or to steal data if the database is used in the future.

What the attacker needed

None

How it was found

  1. View the source code of the Firebase configuration JavaScript file on the website.
  2. Send a PUT request with JSON data to the Firebase database URL.
  3. The data is uploaded and accessible at the corresponding database path.

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. The website's code included the address and key for its database, and the database was left open so anyone could write to it without logging in. This let an attacker add their own data to the company's database.

What is Misconfiguration?

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

More by shuvam321

View all

10 more disclosed reports, best first.

More from MTN Group

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.