Google API Keys Left Exposed in Android Apps Vulnerate Unauthorized Access to Gemini Endpoints

Google-API-Keys-Left-Exposed-in-Android-Apps-Vulnerate-Unauthorized-Access-to-Gemini-Endpoints

Android Applications Exposing Users to Unauthorized Access through Google API Keys

Security researchers have discovered that Google API keys embedded in Android applications can be exploited by malicious actors to gain unauthorized access to Gemini AI endpoints.

A Hidden Threat in Plain Sight

These keys, meant for use with publicly accessible services like Maps, can inadvertently authenticate to the Gemini AI assistant, putting personal data at risk.

According to Truffle Security, “nearly 3,000 Google API keys found on websites could now also authenticate to Gemini, allowing attackers to access uploaded files, cached data, and charge Large Language Model usage fees to the associated account.”

The Scope of the Issue

A recent study by mobile security firm Quokka uncovered over 35,000 unique keys across 250,000 Android applications.

  • The presence of hardcoded Google API keys in applications has increased the attack surface, as these packages are designed to be public and the keys persist across version updates.
  • The keys are embedded based on Google’s own documentation recommendations, rather than being introduced by error.

Real-World Implications

CloudSEK recently discovered 32 Google API keys hardcoded in 22 popular Android apps, providing unauthorized access to Gemini AI.

These applications have a combined user base of over 500 million.

An attacker armed with the extracted key could:• Access private files and cached content• Make arbitrary Gemini API calls• Exhaust API quotas• Directly disrupt legitimate services• Access any data on Gemini’s file storage, including documents, images, and other sensitive information.

The Growing Concern

The ease of extracting these keys has turned what was once a low-risk visibility into a significant attack surface.

What’s Next?

The widespread inclusion of Google API keys in mobile app packages is a well-documented phenomenon within the mobile security research community.

The fact that a class of previously thought-to-be-harmless public identifiers has been silently elevated to sensitive AI credentials makes this finding particularly pressing.



About Author

en_USEnglish