Skip to content
Leaked secrets Disclosed report Beginner

API Keys Hardcoded in Github repository

API keys and a Google services configuration file were publicly exposed in the RocketChat Android GitHub repository. An attacker could use the Fabric key to disrupt analytics and the google-services.json to access Google services associated with RocketChat's account.

codermak Follow

Originally disclosed on HackerOne

  • Triaged in 7 hours
  • Fixed in 2 months
  • Disclosed after 3 months

NOTE! Thanks for submitting a report! Please replace all the [square] sections below with the pertinent details. Remember, the more detail you provide, the easier it is for us to verify and then potentially issue a bounty, so be sure to take your time filling out the report!

Summary: API Keys is hard coded in one of the GitHub repository

Description: Key and google-services.json file is publically available in the RocketChat Android repository.

Releases Affected:

  • Latest Github Code

Steps To Reproduce (from initial installation to vulnerability):

(Add details for how we can reproduce the issue)

Fabric API Key

  1. Go to this URL https://github.com/RocketChat/Rocket.Chat.Android/blob/638759d7b77375fd681f429d2e2d7ba59e602c45/app/src/main/AndroidManifest.xml
  2. Scroll down to the bottom
  3. You will see fabric APIKey hardcoded there

google-services.json

  1. Go to https://github.com/RocketChat/Rocket.Chat.Android/blob/30e95cc97d2fbec6c1d5f6fdad7350fbf60688d5/app/google-services.json
  2. You can see the complete google services config file

Supporting Material/References:

  • Screenshot in attachment

Suggested mitigation

  • Keys should not be pushed to the public repository

Impact

  1. Using Fabric key some attacker can mess up the complete analytics of the RocketChat Android App
  2. google-services.json can be used to access google services of RocketChats google account

Attachments

Screen_Shot_2019-12-31_at_12.52.17_PM.png
Screen_Shot_2019-12-31_at_12.52.17_PM.png From the original on HackerOne
Screen_Shot_2019-12-31_at_1.01.50_PM.png
Screen_Shot_2019-12-31_at_1.01.50_PM.png

The original report as published on HackerOne, by codermak. 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, sensitive credentials were committed to a public source code repository.

Impact

An attacker could use the Fabric key to disrupt the app's analytics and the google-services.json to access RocketChat's Google services.

What the attacker needed

Public GitHub repository

How it was found

  1. Open the AndroidManifest.xml file in the RocketChat Android repository on GitHub.
  2. Scroll to the bottom to find the hardcoded Fabric API key.
  3. Open the google-services.json file in the same repository.
  4. View the complete Google services configuration file.

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.

API keys are like passwords that let apps talk to services. Here, these secrets were left in a public code repository, so anyone could see them. That could let someone mess with the app's analytics or use the app's Google services.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

More by codermak

View all

10 more disclosed reports, best first.

More from Rocket.Chat

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.