Legacy Google Cloud API Keys Gaining Unintended Access to Gemini APIs
Breach & Incident Intelligence · 12 sources · Updated 5mo ago · First seen Feb 27, 2026

Security researchers reported that previously “non-secret” Google Cloud API keys (commonly embedded in public client-side code for services like Google Maps, YouTube embeds, Firebase, and analytics) can silently become usable credentials for Gemini (Generative Language API) endpoints once the Gemini API is enabled in the same Google Cloud project. Truffle Security described this as a privilege escalation/incorrect privilege assignment scenario where long-exposed AIza... keys—originally treated as project identifiers for billing and API access control—can unexpectedly grant access to Gemini-related data and capabilities, including access to private AI resources (e.g., uploaded files/cached context) and billable inference usage, without clear developer warning or explicit re-authorization.
Truffle Security’s internet-scale scanning (including Common Crawl) identified ~2,800–3,000 exposed keys across organizations in multiple sectors (and reportedly even from Google), highlighting the practical risk of key harvesting from page source and subsequent abuse. The primary impact described is data exposure via Gemini API access and cost/abuse risk (attackers potentially generating significant charges by making API calls). Separate from the API-key issue, Google also announced a Gemini feature update for Google Workspace that allows Gemini to search Google Chat history (noted as off by default), which is a product capability announcement rather than a vulnerability disclosure.
Why it matters
Impact assessment
Legacy Google Cloud API keys exposed in public client-side code are now a material risk for any organization that has enabled the Gemini/Generative Language API in the same GCP project. Affected populations include enterprises using Google Maps, Firebase, YouTube embeds, analytics, mobile apps, and other browser-embedded Google services where AIza-prefixed keys were historically treated as non-secret.
The impact is high because exposed keys can enable unauthorized Gemini usage, access to Gemini-related data such as uploaded files and cached context, quota exhaustion, and significant unplanned cloud spend. Exposure appears widespread rather than narrowly targeted: Truffle Security reported 2,863 live vulnerable keys from internet-scale scanning, spanning financial institutions, recruiting firms, security companies, and Google-associated assets.
Known abuse in the wild is not broadly confirmed, but there is a reported real-world incident involving $82,314.44 in unauthorized Gemini charges over roughly 48 hours. Even where data theft is not confirmed, the combination of public key harvesting, silent privilege expansion, and billable AI workloads creates immediate financial and operational risk.
Supporting facts
- Affected product/service: Google Cloud API keys gaining access to Gemini / Generative Language API endpoints.
- Affected key pattern: AIza-prefixed Google API keys.
- Exposure sources: public website source, client-side JavaScript, public repositories, CI/CD artifacts, mobile apps.
- Reported scale: 2,863 live exposed keys; multiple references describe roughly 2,800-3,000 vulnerable keys.
- Additional ecosystem exposure: Quokka reportedly found more than 35,000 unique Google API keys across 250,000 Android apps.
- Potential business impacts:
- Unauthorized Gemini inference charges
- Access to uploaded Gemini files and cached contents
- Quota exhaustion disrupting legitimate AI features
- Reputational damage from exposed AI-connected data
- Reported incident: one startup reported $82,314.44 in unauthorized Gemini 3 Pro Image and Gemini 3 Pro Text usage between 2026-02-11 and 2026-02-12.
- Google stated it implemented proactive leaked-key detection/blocking for Gemini access and planned improved defaults and notifications.


