Exposed Google Cloud API Keys Are Getting a Gateway to Gemini an
Google Cloud API keys that were intended only as billing identifiers and were exposed in public client-side code automatically gained access to Gemini AI endpoints when vendors enabled the Gemini API. An attacker who scrapes such a key could call Gemini endpoints, access files and cached contents, consume LLM resources, and run up large bills.
Published on medium.com
Cloud API keys were never meant to be secrets. They were designed substantially as design identifiers for billing and share shadowing.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, new API keys default to 'Unrestricted', meaning they work with every enabled API in the project, including Gemini and any APIs added later.
Impact
An attacker could call Gemini endpoints, access files and cached contents, consume LLM resources, and rack up massive cloud bills; Google has added discovery for leaked keys and blocked suspicious Gemini access attempts, but it is unclear if this was exploited extensively.
What the attacker needed
A Google Cloud API key exposed in public code; the Gemini API enabled on that project
The fix
API keys should be restricted by service, IP or domain, and application scope; exposed keys should be rotated immediately, unrestricted keys should never be exposed in frontend code, billing anomalies should be monitored, AI APIs should be separated into their own systems, and OAuth or service…
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 write-up has not been written yet. The Original tab links to the source.
An API key is like a password that lets software talk to a service. Google Cloud API keys were often placed in public website code because they were only meant to identify a project for billing, not to protect anything secret. But when a company turns on the Gemini AI service, those same keys silently start working for Gemini too, so anyone who finds one can use the AI at the owner's expense.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.