Skip to content
Leaked secrets Disclosed report Beginner

AppLovin API Key hardcoded in a Github repo

An AppLovin UI API key was hardcoded in a public GitHub repository's AndroidManifest.xml file. If the key were a production key, other developers could reuse it, but the report does not confirm it was live or what access it granted.

hackbotone_ Follow

Originally disclosed on HackerOne

Bounty$280 High View original
  • Triaged in 4 days
  • Fixed in 21 days
  • Paid in 12 days
  • Disclosed after 34 days

Hello, I found a Sensitive Data Exposure in github/mopub-android-mediation project, the AppLovin UI API key is hardcoded in source code.

And in the comment it's mentioned that ##"This is a unique SDK Key from AppLovin. Get yours from the AppLovin UI".

Github Link:- https://github.com/mopub/mopub-android-mediation/blob/72804166ec9f3b79cc0dcfa96bd8c813f3252794/Testing/src/main/AndroidManifest.xml#L60

Google Ads SDK reference link:- https://developers.google.com/admob/android/mediation/applovin

Thanks Anshuman Pattnaik

Impact

So if it's a production API key then it shouldn't be shown publicly in Github repo otherwise it can be used by other developers as it's a company property the API key should be secure as it's a monetize API key.

Attachments

APPLOVIN_API_KEY_SCREENSHOT.PNG
APPLOVIN_API_KEY_SCREENSHOT.PNG From the original on HackerOne

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

The target is the MoPub Android mediation project, published on GitHub under the mopub organisation. The researcher found that an AppLovin UI API key is hardcoded in the source code of the mopub-android-mediation repository, specifically in the test application's manifest.

The report points to this file and line:

Text
https://github.com/mopub/mopub-android-mediation/blob/[redacted]/Testing/src/main/AndroidManifest.xml#L60

The key is accompanied by a comment, which the researcher quotes:

Text
"This is a unique SDK Key from AppLovin. Get yours from the AppLovin UI"

As supporting context, the researcher links the Google Ads SDK mediation documentation for AppLovin:

Text
https://developers.google.com/admob/android/mediation/applovin

The report includes a screenshot of the exposed key as an attachment.

APPLOVIN_API_KEY_SCREENSHOT.PNG
APPLOVIN_API_KEY_SCREENSHOT.PNG From the original on HackerOne

The report was filed on HackerOne and disclosed on 2019-09-18. It was disclosed on 2019-09-18. The report does not describe a fix or a vendor response.

Root cause

The key was committed into a public repository rather than being supplied privately at build time. The comment next to the value makes clear it is meant to be a unique SDK key obtained from the AppLovin UI,

Impact

The report is careful about this: the researcher states that if the key is a production key, it should not be shown publicly in a GitHub repository, because other developers could then use it. The concern is that the key is a monetisation credential and therefore company property that should stay secure. The report does not demonstrate any request made with the key, any account or revenue affected, or any response from AppLovin, so the practical consequences are asserted rather than proven.

How this kind of bug works

Mobile SDKs and ad mediation layers authenticate the app to a backend with an SDK key or API key. That key is necessarily shipped inside the application, so it is never a secret in the cryptographic sense: anyone who installs the app can extract it. The problem in this class of finding is different. A key that is committed to a public source repository is exposed without anyone needing to reverse engineer a binary, it is indexed by search engines and code search tools, and it may be a key that was never meant to leave a developer's account, for example one tied to a specific app, a test account, or a billing relationship.

Exposure happens for predictable reasons: sample and test applications need a working key to compile and run, developers paste one in to unblock themselves, and review does not catch a single line in a manifest among many changes. Once pushed, the value lives in the git history even if the file is later edited, so deleting the line in a new commit does not remove the exposure.

Defences are procedural and technical: keep credentials out of tracked files, inject them from environment variables or local property files that are ignored by version control, use restricted or per-developer keys for samples, and enable secret scanning on the repository so a push is blocked or flagged. Rotation is the only remedy once a key has been public, because history rewriting does not reach forks, caches or scrapers.

How to test for it

  1. Identify the credential format. For ad and analytics SDKs, look at the integration documentation for the key names and shapes (for example SDK keys, app IDs, banner or interstitial unit IDs) so you can recognise a real value rather than a placeholder.
  2. Search public code. Use the hosting provider's code search and general search engines against the organisation's repositories, including sample, demo, testing and example directories, and against the manifest and configuration files where such keys are usually declared.
  3. Check history, not just the current tree. A key removed in a later commit is still present in earlier revisions, so review the file's log and the referenced commit.
  4. Look for the giveaway comment. Vendors often ship a comment next to the placeholder telling developers where to obtain their own key; a real-looking value beside that comment is a strong signal.
  5. Establish whether the value is live and what it grants, within the program's rules. A positive result is a value that the vendor confirms is active and tied to the target, not merely a string that matches a pattern.

Common false positives: documentation placeholders such as YOUR_API_KEY, keys for open-source or public demo accounts that the vendor intends to be visible, test-mode keys with no production effect, and values that have already been revoked. A string that looks like a key but is rejected by the backend is not a finding.

How it is fixed

  • Revoke and reissue the exposed key, then update any application that used it.
  • Remove the value from the current branch and replace it with a build-time injection mechanism, such as an environment variable or a local properties file excluded from version control.
  • Treat the git history as compromised: assume the value has been copied, and do not rely on history rewriting as the fix.
  • Enable secret scanning and push protection on the organisation's repositories so future commits are blocked or alerted.
  • Use separate, restricted keys for samples and tests so that a leaked sample key has no production value.

Hunting notes

This class of finding hides in the places developers use to get code running quickly: sample apps, demo projects, integration test fixtures, CI configuration, Dockerfiles, and manifest or plist files that declare SDK identifiers. Organisation-wide GitHub accounts are worth enumerating, because a hardened main product often sits next to a neglected example repository.

Useful recon signals are an organisation with many public repositories, SDK integration documentation that names the key format, and comments in the code that tell developers to fetch their own key. Searching for the vendor name plus the key parameter name across the organisation's repositories narrows the set quickly.

To get the report accepted, show that the value is real and belongs to the target: confirm with the vendor or program that the key is active, describe what it authenticates, and keep the claim proportional to the evidence. If you cannot prove the key is live, say so, as this report does, rather than asserting production impact.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 8 min read.

What happened, in plain words

MoPub is an advertising product that helps app developers show ads inside their apps. To make money from ads, an app usually talks to several ad networks, and MoPub acts as the middleman ("mediation") that decides which network's ad to show. One of those networks is AppLovin. To use AppLovin, a developer needs an AppLovin key: a long string of characters that identifies the app to AppLovin's servers, a bit like a membership number that tells the shop who you are.

The researcher looked at a public code repository on GitHub called mopub-android-mediation, published under the mopub organisation. A repository is simply a folder of project files that is shared online, and anyone can read it. Inside it, in the test application's manifest (a small configuration file that tells Android how the app is set up), the researcher found a real AppLovin key written directly into the file. This is what people mean by "hardcoded": the value is typed into the source code itself rather than being supplied from somewhere private when the app is built.

The report points to the exact file and line:

Text
https://github.com/mopub/mopub-android-mediation/blob/[redacted]/Testing/src/main/AndroidManifest.xml#L60

Reading that link from left to right: github.com/mopub/mopub-android-mediation is the project, the long string 72804166... identifies one particular saved version (a commit) of the project, Testing/src/main/AndroidManifest.xml is the file, and #L60 means line 60. Pinning the commit matters, because it proves the key was present at that moment in the project's history, not just in some later edited copy.

Next to the key there was a comment, which the researcher quotes:

Text
"This is a unique SDK Key from AppLovin. Get yours from the AppLovin UI"

A comment is text in a file that the computer ignores; it is there for humans. This one is the vendor's own instruction telling developers to go and get their own key from the AppLovin interface. Finding a real-looking value sitting beside that instruction is a strong hint that someone pasted a working key instead of a placeholder.

As supporting context, the researcher linked the Google Ads documentation page for AppLovin mediation:

Text
https://developers.google.com/admob/android/mediation/applovin

That page explains how the integration is meant to be set up, which helps show what the key is for.

The report also includes a screenshot of the exposed key as an attachment.

APPLOVIN_API_KEY_SCREENSHOT.PNG
APPLOVIN_API_KEY_SCREENSHOT.PNG From the original on HackerOne

The report includes a screenshot of the exposed key as an attachment.

The report was filed on HackerOne and disclosed on 2019-09-18. It was disclosed on 2019-09-18. The report does not describe a fix or a vendor response.

Why it happened

The key was saved into a public repository instead of being supplied privately when the app is built. The comment beside the value says it is a unique SDK key obtained from the AppLovin interface,

What it could mean

The report is careful here. The researcher says that if the key is a production key, it should not be shown publicly on GitHub, because other developers could then use it. The concern is that this is a monetisation credential, company property that should stay secure. The report does not show any request made with the key, any account or revenue affected, or any reply from AppLovin, so the consequences are argued rather than proven.

In general, how this kind of bug works

Mobile ad and analytics kits prove to a server which app is calling by sending a key. That key has to travel inside the app, so anyone who installs the app can dig it out; it is never a true secret in the cryptographic sense. The problem here is different: a key saved in a public code repository is exposed without anyone needing to take an app apart, it gets picked up by search engines and code search tools, and it may be a key that was never meant to leave a developer's account, for example one tied to a particular app, a test account or a billing relationship.

This happens for predictable reasons. Sample and test apps need a working key to compile and run, a developer pastes one in to get unblocked, and review does not spot a single line in a manifest among many changes. Once pushed, the value lives on in the project's history even if the file is edited later, so deleting the line in a new commit does not undo the exposure.

Defences are partly about habits and partly about tooling: keep credentials out of tracked files, supply them from environment variables or local property files that version control ignores, use restricted or per-developer keys for samples, and turn on secret scanning so a push is blocked or flagged. Rotation is the only real remedy once a key has been public, because rewriting history does not reach forks, caches or scrapers.

How to test for it

  1. Learn the credential format. For ad and analytics kits, read the integration documentation for the key names and shapes (SDK keys, app IDs, ad unit IDs) so you can tell a real value from a placeholder.
  2. Search public code. Use the hosting provider's code search and ordinary search engines against the organisation's repositories, including sample, demo, testing and example folders, and against the manifest and configuration files where such keys usually sit.
  3. Check history, not just the current files. A key removed in a later commit is still in earlier versions, so review the file's log and the referenced commit.
  4. Look for the giveaway comment. Vendors often leave a comment next to the placeholder telling developers where to get their own key; a real-looking value beside that comment is a strong signal.
  5. Establish whether the value is live and what it grants, within the program's rules. A positive result is a value the vendor confirms is active and tied to the target, not merely a string that matches a pattern.

Common false positives: documentation placeholders such as YOUR_API_KEY, keys for open-source or public demo accounts the vendor intends to be visible, test-mode keys with no production effect, and values already revoked. A string that looks like a key but is rejected by the backend is not a finding.

How it is fixed

  • Revoke and reissue the exposed key, then update any application that used it.
  • Remove the value from the current branch and replace it with a build-time mechanism, such as an environment variable or a local properties file excluded from version control.
  • Treat the project history as compromised: assume the value has been copied, and do not rely on rewriting history as the fix.
  • Enable secret scanning and push protection on the organisation's repositories so future commits are blocked or alerted.
  • Use separate, restricted keys for samples and tests so a leaked sample key has no production value.

Where to look

This kind of finding hides where developers get code running quickly: sample apps, demo projects, test fixtures, CI configuration, Dockerfiles, and manifest or plist files that declare SDK identifiers. Organisation-wide GitHub accounts are worth going through, because a well-protected main product often sits next to a neglected example repository. Useful signals are an organisation with many public repositories, integration documentation that names the key format, and comments telling developers to fetch their own key. Searching for the vendor name plus the key parameter name across the organisation's repositories narrows the set quickly.

To get a report accepted, show that the value is real and belongs to the target: confirm with the vendor or program that the key is active, describe what it authenticates, and keep the claim proportional to the evidence. If you cannot prove the key is live, say so, as this report does, rather than asserting production impact.

Glossary

  • API key: a string that identifies an app or developer to a service, like a membership number.
  • AppLovin: an advertising network that apps use to show ads.
  • Bounty: a payment made by a program for a valid security report.
  • Cleartext storage: keeping sensitive data in readable form, with no encryption.
  • Commit: a saved snapshot of a project's files at a point in time.
  • Credential: any value that proves identity, such as a key or password.
  • CVSS: a scoring system for rating the severity of a vulnerability.
  • Environment variable: a value set outside the code, in the system running the build, so it need not be written in a file.
  • False positive: a report that looks like a problem but is not one.
  • Git: the version control system that records changes to files.
  • GitHub: a website that hosts Git repositories publicly or privately.
  • Hardcoded: a value typed directly into source code instead of supplied from elsewhere.
  • HackerOne: a platform where researchers report bugs to companies.
  • Manifest: a configuration file that describes how an Android app is set up.
  • Mediation: a layer that chooses between several ad networks inside one app.
  • MoPub: an advertising and mediation product for mobile apps.
  • Placeholder: a fake value such as YOUR_API_KEY that stands in for a real one.
  • Production key: a live credential used by the real, released product.
  • Repository: a project folder tracked by Git, often shared online.
  • Revoke: to cancel a key so it no longer works.
  • Rotation: replacing an exposed key with a new one and updating everything that used it.
  • SDK: a set of code from a vendor that developers add to their app to use its service.
  • Secret scanning: a tool that watches for credentials in code and blocks or flags them.
  • Severity: how serious a vulnerability is judged to be.
  • Token: a value used to prove identity or permission, similar to a key.

More from X / xAI

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.