Firebase Cloud Messaging Service Takeover: A small research that led to 30k$+ in bounties
The report describes how exposed Firebase Cloud Messaging (FCM) server keys in Android apps can be used to send push notifications to all users of the app. An attacker could broadcast malicious notifications, including images and text, to every user of a vulnerable application.
A malicous attacker could control the content of push notifications to any application that runs the FCM SDK and has it’s FCM server key exposed & at the same time send these notifications to every single user of the vulnerable application!
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 FCM server key was hardcoded in the Android app's resources or code, making it accessible to anyone who decompiles the app.
Impact
An attacker could send arbitrary push notifications, including images and text, to all users of a vulnerable application, potentially causing reputational damage or spreading misinformation.
What the attacker needed
Exposed FCM server key in app; Ability to decompile APK; No user interaction required
The fix
The FCM server key should not be embedded in the client app; it should be kept server-side and rotated if exposed.
How it was found
- Download and decompile Android APKs from bug bounty programs.
- Grep for patterns matching FCM server keys in the decompiled files.
- Validate each key by sending a test request to the FCM endpoint and checking for a 200 OK response.
- Use a condition like "!('random_topic' in topics)" to target all users without knowing their topic subscriptions.
- Send a notification to all users using the validated key and the condition.
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.
Push notifications are messages that apps send to your phone. The report found that some apps accidentally included a secret key in their Android app that allows sending these notifications. Anyone who finds that key can send fake notifications to all users of the app, which could be used to spread misinformation or disturbing content.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.