Google API Key Oversight Exposes Secret Gemini Access
- •Google Maps and Gemini share API keys, causing unintended public exposure of secret credentials
- •Truffle Security identifies 2,863 exposed API keys capable of accessing sensitive Gemini model endpoints
- •Developers unknowingly escalate privileges by enabling Gemini on projects with existing public web keys
A significant security oversight has been identified regarding how Google manages API keys across its various services. Historically, Google Maps API keys were intentionally designed to be public, often embedded directly into website source code to render maps. However, a privilege escalation occurs when a developer enables the Gemini API within the same Google Cloud project. Because these services share the same authentication credentials, a key that was once a harmless public identifier suddenly becomes a high-stakes secret capable of accessing private files and incurring significant financial charges.
The core of the issue lies in the lack of warning provided to developers during this transition. When Gemini is activated, the permissions of existing keys are silently expanded without notifying the user that their previously safe, public-facing keys are now vulnerabilities. This architectural design creates a trap where legacy configurations become modern security risks, as the functional scope of a key changes behind the scenes.
Recent investigations by Truffle Security highlighted the scale of this problem. Their analysis of the November 2025 Common Crawl—a massive archive of the internet—uncovered nearly 3,000 active API keys that could access Gemini endpoints. Alarmingly, several of these keys belonged to Google themselves, with some having been exposed in the wild for years before the Gemini API even existed. While Google is currently working to revoke the affected credentials, the incident serves as a stark reminder of the complexities involved in managing cross-service infrastructure in the age of generative AI.